DoxigAlpha

Const

A arbitrary-precision big integer, with a fixed set of immutable limbs.

Fields of this type

Fields

#
limbs:[]const Limb
Raw digits.
positive:bool

The result is an independent resource which is managed by the caller.

Functions

#
toManaged
The result is an independent resource which is managed by the caller.
toMutable
Asserts `limbs` is big enough to store the value.
bitCountAbs
Returns the number of bits required to represent the absolute value of an integer.
bitCountTwosComp
Returns the number of bits required to represent the integer in twos-complement form.
bitCountTwosCompForSignedness
Returns the number of bits required to represent the integer in twos-complement form
popCount
@popCount with two's complement semantics.
fits
Returns whether self can fit into an integer of the requested type.
sizeInBaseUpperBound
Returns the approximate size of the integer in the given base.
toInt
Convert `self` to `Int`.
toFloat
Convert self to `Float`.
formatNumber
If the absolute value of integer is greater than or equal to `pow(2, 64 * @sizeOf(usize) * 8)`,
toStringAlloc
Converts self to a string in the requested base.
toString
Converts self to a string in the requested base.
writeTwosComplement
Write the value of `x` into `buffer`
writePackedTwosComplement
Write the value of `x` to a packed memory `buffer`.
orderAbs
Returns `math.Order.lt`, `math.Order.eq`, `math.Order.gt` if
order
Returns `math.Order.lt`, `math.Order.eq`, `math.Order.gt` if `a < b`, `a == b` or `a > b` respectively.
orderAgainstScalar
Same as `order` but the right-hand operand is a primitive integer.
eqlZero
Returns true if `a == 0`.
eqlAbs
Returns true if `|a| == |b|`.
eql
Returns true if `a == b`.
clz
Returns the number of leading zeros in twos-complement form.
ctz
Returns the number of trailing zeros in twos-complement form.

Error sets in this namespace

Error Sets

#