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.
std.int128
Implements a signed 128 bit integer type.
Author Walter Bright
License:
Source std/int128.d
- struct
Int128; - 128 bit signed integer type.
- Cent
data; - core.int128.Cent
- pure nothrow @nogc @safe this(long
lo); - Construct an Int128 from a long value. The upper 64 bits are formed by sign extension.Parameters:
long losigned lower 64 bits - pure nothrow @nogc @safe this(ulong
lo); - Construct an Int128 from a ulong value. The upper 64 bits are set to zero.Parameters:
ulong lounsigned lower 64 bits - pure nothrow @nogc @safe this(long
hi, longlo); - Construct an Int128 from a long value.Parameters:
long hiupper 64 bits long lolower 64 bits - pure nothrow @nogc @safe this(Cent
data); - Construct an Int128 from a Cent.Parameters:
Cent dataCent data - const pure nothrow @nogc @safe size_t
toHash(); - Returns:hash value for Int128
- const pure nothrow @nogc @safe bool
opEquals(longlo); - Compare for equalityParameters:
long losigned value to compare with Returns:true if Int128 equals value - const pure nothrow @nogc @safe bool
opEquals(ulonglo); - Compare for equalityParameters:
ulong lounsigned value to compare with Returns:true if Int128 equals value - const pure nothrow @nogc @safe bool
opEquals(Int128op2); - Compare for equalityParameters:
Int128 op2value to compare with Returns:true if Int128 equals value - const Int128
opUnary(string op)()
if (op == "+"); - Support unary arithmentic operator +Parameters:
op "+" Returns:lvalue of result - const Int128
opUnary(string op)()
if (op == "-" || op == "~"); - Support unary arithmentic operator - ~Parameters:
op "-", "~" Returns:lvalue of result - Int128
opUnary(string op)()
if (op == "++" || op == "--"); - Support unary arithmentic operator ++ --Parameters:
op "++", "--" Returns:lvalue of result - const bool
opCast(T : bool)(); - Support casting to a boolParameters:
T bool Returns:boolean result - const Int128
opBinary(string op)(Int128op2)
if (op == "+" || op == "-" || op == "*" || op == "/" || op == "%" || op == "&" || op == "|" || op == "^");
const Int128opBinary(string op)(longop2)
if (op == "+" || op == "-" || op == "*" || op == "/" || op == "%" || op == "&" || op == "|" || op == "^");
const Int128opBinaryRight(string op)(longop2)
if (op == "+" || op == "-" || op == "*" || op == "/" || op == "%" || op == "&" || op == "|" || op == "^");
const Int128opBinary(string op)(longop2)
if (op == "<<");
const Int128opBinary(string op)(longop2)
if (op == ">>");
const Int128opBinary(string op)(longop2)
if (op == ">>>"); - Support binary arithmetic operators + - * / % & | ^ << >> >>>Parameters:
op one of the arithmetic binary operators Int128 op2second operand Returns:value after the operation is applied - ref Int128
opOpAssign(string op)(Int128op2)
if (op == "+" || op == "-" || op == "*" || op == "/" || op == "%" || op == "&" || op == "|" || op == "^" || op == "<<" || op == ">>" || op == ">>>");
ref Int128opOpAssign(string op)(longop2)
if (op == "+" || op == "-" || op == "*" || op == "/" || op == "%" || op == "&" || op == "|" || op == "^" || op == "<<" || op == ">>" || op == ">>>"); - arithmetic assignment operators += -= *= /= %= &= |= ^= <<= >>= >>>=Parameters:
op one of +, -, etc. Int128 op2second operand Returns:lvalue of updated left operand - const pure nothrow @nogc @safe int
opCmp(Int128op2); - support signed arithmentic comparison operators < <= > >=Parameters:
Int128 op2right hand operand Returns:-1 for less than, 0 for equals, 1 for greater than - const pure nothrow @nogc @safe int
opCmp(longop2); - support signed arithmentic comparison operators < <= > >=Parameters:
long op2right hand operand Returns:-1 for less than, 0 for equals, 1 for greater than - enum Int128
min; - minimum value
- enum Int128
max; - maximum value
Copyright © 1999-2024 by the D Language Foundation | Page generated by
Ddoc on (no date time)