core.int128

Types 3

private aliasI = long
private aliasU = ulong
structCent

128 bit integer type. See_also: Int128.

Functions 35

fnbool tst(Cent c) pureTest against 0 Params: c = Cent to test Returns: true if != 0
fnCent com(Cent c) pureComplement Params: c = Cent to complement Returns: complemented value
fnCent neg(Cent c) pureNegate Params: c = Cent to negate Returns: negated value
fnCent inc(Cent c) pureIncrement Params: c = Cent to increment Returns: incremented value
fnCent dec(Cent c) pureDecrement Params: c = Cent to decrement Returns: incremented value
fnCent shl1(Cent c) pureShift left one bit Params: c = Cent to shift Returns: shifted value
fnCent shr1(Cent c) pureUnsigned shift right one bit Params: c = Cent to shift Returns: shifted value
fnCent sar1(Cent c) pureArithmetic shift right one bit Params: c = Cent to shift Returns: shifted value
fnCent shl(Cent c, uint n) pureShift left n bits Params: c = Cent to shift n = number of bits to shift Returns: shifted value
fnCent shr(Cent c, uint n) pureUnsigned shift right n bits Params: c = Cent to shift n = number of bits to shift Returns: shifted value
fnCent sar(Cent c, uint n) pureArithmetic shift right n bits Params: c = Cent to shift n = number of bits to shift Returns: shifted value
fnCent rol1(Cent c) pureRotate left one bit Params: c = Cent to rotate Returns: rotated value
fnCent ror1(Cent c) pureRotate right one bit Params: c = Cent to rotate Returns: rotated value
fnCent rol(Cent c, uint n) pureRotate left n bits Params: c = Cent to rotate n = number of bits to rotate Returns: rotated value
fnCent ror(Cent c, uint n) pureRotate right n bits Params: c = Cent to rotate n = number of bits to rotate Returns: rotated value
fnCent and(Cent c1, Cent c2) pureAnd c1 & c2. Params: c1 = operand 1 c2 = operand 2 Returns: c1 & c2
fnCent or(Cent c1, Cent c2) pureOr c1 | c2. Params: c1 = operand 1 c2 = operand 2 Returns: c1 | c2
fnCent xor(Cent c1, Cent c2) pureXor c1 ^ c2. Params: c1 = operand 1 c2 = operand 2 Returns: c1 ^ c2
fnCent add(Cent c1, Cent c2) pureAdd c1 to c2. Params: c1 = operand 1 c2 = operand 2 Returns: c1 + c2
fnCent sub(Cent c1, Cent c2) pureSubtract c2 from c1. Params: c1 = operand 1 c2 = operand 2 Returns: c1 - c2
fnCent mul(Cent c1, Cent c2) pureMultiply c1 c2. Params: c1 = operand 1 c2 = operand 2 Returns: c1 c2
fnCent mul(ulong u1, ulong u2) pureMultiply 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) pureUnsigned divide c1 / c2. Params: c1 = dividend c2 = divisor Returns: quotient c1 / c2
fnCent udivmod(Cent c1, Cent c2, out Cent modulus) pureUnsigned 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) pureUnsigned 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) pureSigned divide c1 / c2. Params: c1 = dividend c2 = divisor Returns: quotient c1 / c2
fnCent divmod(Cent c1, Cent c2, out Cent modulus) pureSigned 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
fnbool ugt(Cent c1, Cent c2) pureIf c1 > c2 unsigned Params: c1 = operand 1 c2 = operand 2 Returns: true if c1 > c2
fnbool uge(Cent c1, Cent c2) pureIf c1 >= c2 unsigned Params: c1 = operand 1 c2 = operand 2 Returns: true if c1 >= c2
fnbool ult(Cent c1, Cent c2) pureIf c1 < c2 unsigned Params: c1 = operand 1 c2 = operand 2 Returns: true if c1 < c2
fnbool ule(Cent c1, Cent c2) pureIf c1 <= c2 unsigned Params: c1 = operand 1 c2 = operand 2 Returns: true if c1 <= c2
fnbool gt(Cent c1, Cent c2) pureIf c1 > c2 signed Params: c1 = operand 1 c2 = operand 2 Returns: true if c1 > c2
fnbool ge(Cent c1, Cent c2) pureIf c1 >= c2 signed Params: c1 = operand 1 c2 = operand 2 Returns: true if c1 >= c2
fnbool lt(Cent c1, Cent c2) pureIf c1 < c2 signed Params: c1 = operand 1 c2 = operand 2 Returns: true if c1 < c2
fnbool le(Cent c1, Cent c2) pureIf 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)