ErlangBigInteger¶
An integer wider than 64 bits.
It is kept the way the external format keeps it - a sign and a magnitude in
base 256, least significant byte first - so nothing is lost on the way in or
out, and decimal() is only computed when a person needs to read it.
The magnitude is normalised on construction: trailing zero digits are
dropped and zero is stored as no digits with a positive sign. An integer
that fits into 64 bits arrives as ErlangInteger instead, so a value that
was built here can decode as a different class.
Implements¶
- Equatable[ErlangBigInteger val] ref
- Hashable ref
- Stringable box
Constructors¶
create¶
Parameters¶
Returns¶
- ErlangBigInteger val^
Public fields¶
let negative: Bool val¶
let digits: Array[U8 val] val¶
Public Functions¶
is_zero¶
Returns¶
- Bool val
eq¶
Parameters¶
- that: ErlangBigInteger val
Returns¶
- Bool val
hash¶
Returns¶
- USize val
decimal¶
The value in base 10, with a leading minus sign when negative.
Returns¶
- String iso^
string¶
Returns¶
- String iso^
ne¶
Parameters¶
- that: ErlangBigInteger val
Returns¶
- Bool val