Menu

- Learn
- Documentation
  - Language Reference
  - Library Reference
  - Command-line Reference
  - Feature Overview
  - Articles
- Downloads
- Packages
- Community
  - Blog
  - Orgs using D
  - Twitter
  - Forums
  - IRC
  - Community Discord
  - Wiki
  - GitHub
  - Issues
  - Get involved
  - Contributors
  - Foundation
  - Security Team
  - Donate
  - Sponsors
- Resources
  - Tour
  - Books
  - Tutorials
  - Tools
  - Editors
  - IDEs
  - run.dlang.io
  - Visual D
  - Acknowledgments
  - D Style
  - Glossary
  - Sitemap

Search
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

# core.int128

pure nothrow @nogc @safe bool `tst`(Cent `c`);
  Test against 0
  Parameters:

  Cent `c` | Cent to test

  Returns:
  true if != 0
pure nothrow @nogc @safe Cent `com`(Cent `c`);
  Complement
  Parameters:

  Cent `c` | Cent to complement

  Returns:
  complemented value
pure nothrow @nogc @safe Cent `neg`(Cent `c`);
  Negate
  Parameters:

  Cent `c` | Cent to negate

  Returns:
  negated value
pure nothrow @nogc @safe Cent `inc`(Cent `c`);
  Increment
  Parameters:

  Cent `c` | Cent to increment

  Returns:
  incremented value
pure nothrow @nogc @safe Cent `dec`(Cent `c`);
  Decrement
  Parameters:

  Cent `c` | Cent to decrement

  Returns:
  incremented value
pure nothrow @nogc @safe Cent `shl1`(Cent `c`);
  Shift left one bit
  Parameters:

  Cent `c` | Cent to shift

  Returns:
  shifted value
pure nothrow @nogc @safe Cent `shr1`(Cent `c`);
  Unsigned shift right one bit
  Parameters:

  Cent `c` | Cent to shift

  Returns:
  shifted value
pure nothrow @nogc @safe Cent `sar1`(Cent `c`);
  Arithmetic shift right one bit
  Parameters:

  Cent `c` | Cent to shift

  Returns:
  shifted value
pure nothrow @nogc @safe Cent `shl`(Cent `c`, uint `n`);
  Shift left n bits
  Parameters:

  Cent `c` | Cent to shift
  uint `n` | number of bits to shift

  Returns:
  shifted value
pure nothrow @nogc @safe Cent `shr`(Cent `c`, uint `n`);
  Unsigned shift right n bits
  Parameters:

  Cent `c` | Cent to shift
  uint `n` | number of bits to shift

  Returns:
  shifted value
pure nothrow @nogc @safe Cent `sar`(Cent `c`, uint `n`);
  Arithmetic shift right n bits
  Parameters:

  Cent `c` | Cent to shift
  uint `n` | number of bits to shift

  Returns:
  shifted value
pure nothrow @nogc @safe Cent `rol1`(Cent `c`);
  Rotate left one bit
  Parameters:

  Cent `c` | Cent to rotate

  Returns:
  rotated value
pure nothrow @nogc @safe Cent `ror1`(Cent `c`);
  Rotate right one bit
  Parameters:

  Cent `c` | Cent to rotate

  Returns:
  rotated value
pure nothrow @nogc @safe Cent `rol`(Cent `c`, uint `n`);
  Rotate left n bits
  Parameters:

  Cent `c` | Cent to rotate
  uint `n` | number of bits to rotate

  Returns:
  rotated value
pure nothrow @nogc @safe Cent `ror`(Cent `c`, uint `n`);
  Rotate right n bits
  Parameters:

  Cent `c` | Cent to rotate
  uint `n` | number of bits to rotate

  Returns:
  rotated value
pure nothrow @nogc @safe Cent `and`(Cent `c1`, Cent `c2`);
  And c1 & c2.
  Parameters:

  Cent `c1` | operand 1
  Cent `c2` | operand 2

  Returns:
  c1 & c2
pure nothrow @nogc @safe Cent `or`(Cent `c1`, Cent `c2`);
  Or c1 | c2.
  Parameters:

  Cent `c1` | operand 1
  Cent `c2` | operand 2

  Returns:
  c1 | c2
pure nothrow @nogc @safe Cent `xor`(Cent `c1`, Cent `c2`);
  Xor c1 ^ c2.
  Parameters:

  Cent `c1` | operand 1
  Cent `c2` | operand 2

  Returns:
  c1 ^ c2
pure nothrow @nogc @safe Cent `add`(Cent `c1`, Cent `c2`);
  Add c1 to c2.
  Parameters:

  Cent `c1` | operand 1
  Cent `c2` | operand 2

  Returns:
  c1 + c2
pure nothrow @nogc @safe Cent `sub`(Cent `c1`, Cent `c2`);
  Subtract c2 from c1.
  Parameters:

  Cent `c1` | operand 1
  Cent `c2` | operand 2

  Returns:
  c1 - c2
pure nothrow @nogc @safe Cent `mul`(Cent `c1`, Cent `c2`);
  Multiply c1 * c2.
  Parameters:

  Cent `c1` | operand 1
  Cent `c2` | operand 2

  Returns:
  c1 * c2
pure nothrow @nogc @safe Cent `udiv`(Cent `c1`, Cent `c2`);
  Unsigned divide c1 / c2.
  Parameters:

  Cent `c1` | dividend
  Cent `c2` | divisor

  Returns:
  quotient c1 / c2
pure nothrow @nogc @safe Cent `udivmod`(Cent `c1`, Cent `c2`, out Cent `modulus`);
  Unsigned divide c1 / c2. The remainder after division is stored to modulus.
  Parameters:

  Cent `c1` | dividend
  Cent `c2` | divisor
  Cent `modulus` | set to c1 % c2

  Returns:
  quotient c1 / c2
pure nothrow @nogc @safe Cent `div`(Cent `c1`, Cent `c2`);
  Signed divide c1 / c2.
  Parameters:

  Cent `c1` | dividend
  Cent `c2` | divisor

  Returns:
  quotient c1 / c2
pure nothrow @nogc @safe Cent `divmod`(Cent `c1`, Cent `c2`, out Cent `modulus`);
  Signed divide c1 / c2. The remainder after division is stored to modulus.
  Parameters:

  Cent `c1` | dividend
  Cent `c2` | divisor
  Cent `modulus` | set to c1 % c2

  Returns:
  quotient c1 / c2
pure nothrow @nogc @safe bool `ugt`(Cent `c1`, Cent `c2`);
  If c1 > c2 unsigned
  Parameters:

  Cent `c1` | operand 1
  Cent `c2` | operand 2

  Returns:
  true if c1 > c2
pure nothrow @nogc @safe bool `uge`(Cent `c1`, Cent `c2`);
  If c1 >= c2 unsigned
  Parameters:

  Cent `c1` | operand 1
  Cent `c2` | operand 2

  Returns:
  true if c1 >= c2
pure nothrow @nogc @safe bool `ult`(Cent `c1`, Cent `c2`);
  If c1 < c2 unsigned
  Parameters:

  Cent `c1` | operand 1
  Cent `c2` | operand 2

  Returns:
  true if c1 < c2
pure nothrow @nogc @safe bool `ule`(Cent `c1`, Cent `c2`);
  If c1 <= c2 unsigned
  Parameters:

  Cent `c1` | operand 1
  Cent `c2` | operand 2

  Returns:
  true if c1 <= c2
pure nothrow @nogc @safe bool `gt`(Cent `c1`, Cent `c2`);
  If c1 > c2 signed
  Parameters:

  Cent `c1` | operand 1
  Cent `c2` | operand 2

  Returns:
  true if c1 > c2
pure nothrow @nogc @safe bool `ge`(Cent `c1`, Cent `c2`);
  If c1 >= c2 signed
  Parameters:

  Cent `c1` | operand 1
  Cent `c2` | operand 2

  Returns:
  true if c1 >= c2
pure nothrow @nogc @safe bool `lt`(Cent `c1`, Cent `c2`);
  If c1 < c2 signed
  Parameters:

  Cent `c1` | operand 1
  Cent `c2` | operand 2

  Returns:
  true if c1 < c2
pure nothrow @nogc @safe bool `le`(Cent `c1`, Cent `c2`);
  If c1 <= c2 signed
  Parameters:

  Cent `c1` | operand 1
  Cent `c2` | operand 2

  Returns:
  true if c1 <= c2

Copyright © 1999-2023 by the D Language Foundation | Page generated by Ddoc on Fri Jun 2 08:58:43 2023