BigNumber

BigNumber used in the HiBON format It is a wrapper of the std.bigint

Constructors

this
this(T x)

Construct a BigNumber for an integer

this
this(const(BigInt) x)

Construct an number for a BigInt

this
this(const(BigNumber) big)

Construct an number for a BigNumber

this
this(const(BigDigit[]) data, bool sign)
Undocumented in source.
this
this(Range s)

Constructor from a number-string range

this
this(Range s)

Construct an BigNumber from a string of numbers

this
this(const(ubyte[]) buffer)

constructor for BigNumber in LEB128+ formant

Members

Aliases

DecodeLEB128
alias DecodeLEB128 = Tuple!(BigNumber, "value", size_t, "size")
Undocumented in source.
serialize
alias serialize = encodeLEB128
Undocumented in source.

Enums

ZERO
anonymousenum ZERO
Undocumented in source.

Functions

calc_size
size_t calc_size()
Undocumented in source. Be warned that the author may not have intended to support it.
check_minuz_zero
void check_minuz_zero()
Undocumented in source. Be warned that the author may not have intended to support it.
convert
T convert()

Converts to type T

data
const(BigDigit[]) data()
encodeLEB128
immutable(ubyte[]) encodeLEB128()
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
BigNumber opAssign(T x)

Assign of the value x

opBinary
BigNumber opBinary(T y)

Binary operator of op

opCast
T opCast()

cast BigNumber to a bool

opCast
T opCast()

cast BigNumber to a type T

opCmp
int opCmp(BigNumber y)
int opCmp(T y)

Compare the BigNumber to y

opEquals
bool opEquals(BigNumber y)
bool opEquals(T y)

Check the BigNumber has the equal value to y

opOpAssign
BigNumber opOpAssign(T y)

Operation assignment of the value y

opUnary
BigNumber opUnary()
opUnary
BigNumber opUnary()
sign
bool sign()
toDecimalString
string toDecimalString()

Coverts to a decimal number as a string as

toHex
string toHex()

Coverts to a hexa-decimal number as a string as

toString
void toString(void delegate(const(char)[]) sink, string formatString)
void toString(void delegate(const(char)[]) sink, FormatSpec!char f)

Coverts to a number string as a format

two_complement
TwoComplementRange two_complement()

Converts the BigNumber as a two complement representation

Properties

ulongLength
size_t ulongLength [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

calc_size
size_t calc_size(const(ubyte[]) data)
Undocumented in source. Be warned that the author may not have intended to support it.
decodeLEB128
DecodeLEB128 decodeLEB128(const(ubyte[]) data)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

TwoComplementRange
struct TwoComplementRange
Undocumented in source.

Meta