core.int128

Types 3

private aliasI = long
private aliasU = ulong
structCent

128 bit integer type. See_also: Int128.

Functions 38

fnbool tst(Cent c) pure nothrow @safe @nogcTest against 0 Params: c = Cent to test Returns: true if != 0
fnCent com(Cent c) pure nothrow @safe @nogcComplement Params: c = Cent to complement Returns: complemented value
fnCent neg(Cent c) pure nothrow @safe @nogcNegate Params: c = Cent to negate Returns: negated value
fnCent abs(Cent c) pure nothrow @safe @nogcAbsolute value Note: This is a signed operation. Params: c = Cent to get absolute value of Returns: absolute value of c
fnCent inc(Cent c) pure nothrow @safe @nogcIncrement Params: c = Cent to increment Returns: incremented value
fnCent dec(Cent c) pure nothrow @safe @nogcDecrement Params: c = Cent to decrement Returns: incremented value
fnCent shl1(Cent c) pure nothrow @safe @nogcShift left one bit Params: c = Cent to shift Returns: shifted value
fnCent shr1(Cent c) pure nothrow @safe @nogcUnsigned shift right one bit Params: c = Cent to shift Returns: shifted value
fnCent sar1(Cent c) pure nothrow @safe @nogcArithmetic shift right one bit Params: c = Cent to shift Returns: shifted value
fnCent shl(Cent c, uint n) pure nothrow @safe @nogcShift left n bits Params: c = Cent to shift n = number of bits to shift Returns: shifted value
fnCent shr(Cent c, uint n) pure nothrow @safe @nogcUnsigned shift right n bits Params: c = Cent to shift n = number of bits to shift Returns: shifted value
fnCent sar(Cent c, uint n) pure nothrow @safe @nogcArithmetic shift right n bits
fnCent rol1(Cent c) pure nothrow @safe @nogcRotate left one bit Params: c = Cent to rotate Returns: rotated value
fnCent ror1(Cent c) pure nothrow @safe @nogcRotate right one bit Params: c = Cent to rotate Returns: rotated value
fnCent rol(Cent c, uint n) pure nothrow @safe @nogcRotate left n bits Params: c = Cent to rotate n = number of bits to rotate Returns: rotated value
fnCent ror(Cent c, uint n) pure nothrow @safe @nogcRotate right n bits Params: c = Cent to rotate n = number of bits to rotate Returns: rotated value
fnCent and(Cent c1, Cent c2) pure nothrow @safe @nogcAnd c1 & c2. Params: c1 = operand 1 c2 = operand 2 Returns: c1 & c2
fnCent or(Cent c1, Cent c2) pure nothrow @safe @nogcOr c1 | c2. Params: c1 = operand 1 c2 = operand 2 Returns: c1 | c2
fnCent xor(Cent c1, Cent c2) pure nothrow @safe @nogcXor c1 ^ c2. Params: c1 = operand 1 c2 = operand 2 Returns: c1 ^ c2
fnCent add(Cent c1, Cent c2) pure nothrow @safe @nogcAdd c1 to c2. Params: c1 = operand 1 c2 = operand 2 Returns: c1 + c2
fnCent sub(Cent c1, Cent c2) pure nothrow @safe @nogcSubtract c2 from c1. Params: c1 = operand 1 c2 = operand 2 Returns: c1 - c2
fnCent mul(Cent c1, Cent c2) pure nothrow @safe @nogcMultiply c1 c2. Note: The algorithm is identical for both signed and unsigned multiplication. Params: c1 = operand 1 c2 = operand 2 Returns: c1 c2
fnCent mul(ulong u1, ulong u2) pure nothrow @safe @nogcMultiply 64-bit operands u1 u2 in 128-bit precision. Params: u1 = operand 1 u2 = operand 2 Returns: u1 u2 in 128-bit precision
fnCent udiv(Cent c1, Cent c2) pure nothrow @safe @nogcUnsigned divide c1 / c2. Params: c1 = dividend c2 = divisor Returns: quotient c1 / c2
fnCent udivmod(Cent c1, Cent c2, out Cent modulus) pure nothrow @safe @nogcUnsigned divide c1 / c2. The remainder after division is stored to modulus. Params: c1 = dividend c2 = divisor modulus = set to c1 % c2 Returns: quotient c1 / c2
fnU udivmod(Cent c1, U c2, out U modulus) pure nothrow @safe @nogcUnsigned divide 128-bit c1 / 64-bit c2. The result must fit in 64 bits. The remainder after division is stored to modulus. Params: c1 = dividend c2 = divisor modulus = set to c1 % c2 Returns: quoti...
fnCent div(Cent c1, Cent c2) pure nothrow @safe @nogcSigned divide c1 / c2. Note: Performs signed division. Use udiv() for unsigned division. Params: c1 = dividend c2 = divisor Returns: quotient c1 / c2
fnCent divmod(Cent c1, Cent c2, out Cent modulus) pure nothrow @safe @nogcSigned divide c1 / c2. The remainder after division is stored to modulus. Params: c1 = dividend c2 = divisor modulus = set to c1 % c2 Returns: quotient c1 / c2
fnCent urem(Cent c1, Cent c2) pure nothrow @safe @nogcUnsigned remainder c1 % c2. Params: c1 = dividend c2 = divisor Returns: remainder c1 % c2
fnCent rem(Cent c1, Cent c2) pure nothrow @safe @nogcSigned remainder c1 % c2. Params: c1 = dividend c2 = divisor Returns: remainder c1 % c2
fnbool ugt(Cent c1, Cent c2) pure nothrow @safe @nogcIf c1 > c2 unsigned Params: c1 = operand 1 c2 = operand 2 Returns: true if c1 > c2
fnbool uge(Cent c1, Cent c2) pure nothrow @safe @nogcIf c1 >= c2 unsigned Params: c1 = operand 1 c2 = operand 2 Returns: true if c1 >= c2
fnbool ult(Cent c1, Cent c2) pure nothrow @safe @nogcIf c1 < c2 unsigned Params: c1 = operand 1 c2 = operand 2 Returns: true if c1 < c2
fnbool ule(Cent c1, Cent c2) pure nothrow @safe @nogcIf c1 <= c2 unsigned Params: c1 = operand 1 c2 = operand 2 Returns: true if c1 <= c2
fnbool gt(Cent c1, Cent c2) pure nothrow @safe @nogcIf c1 > c2 signed Params: c1 = operand 1 c2 = operand 2 Returns: true if c1 > c2
fnbool ge(Cent c1, Cent c2) pure nothrow @safe @nogcIf c1 >= c2 signed Params: c1 = operand 1 c2 = operand 2 Returns: true if c1 >= c2
fnbool lt(Cent c1, Cent c2) pure nothrow @safe @nogcIf c1 < c2 signed Params: c1 = operand 1 c2 = operand 2 Returns: true if c1 < c2
fnbool le(Cent c1, Cent c2) pure nothrow @safe @nogcIf c1 <= c2 signed Params: c1 = operand 1 c2 = operand 2 Returns: true if c1 <= c2

Variables 4

enumvarUbits = uint(U.sizeof * 8)
enumvarOne = Cent
enumvarZero = Cent
enumvarMinusOne = neg(One)