inf_add
Create, add, subtract, multiply, and display infinitely long positive numbers.
WARNING
This library is in an early stage of development. Breaking changes may occur in future versions.
Documentation is still in progress.
Usage Notes
The recommended way to perform operations on InfInt objects is to use *_destroy functions,
such as obj.add_destroy(other).
You can also use default operators, like so:
let obj a = new;
let obj b = new;
let obj c = a + b; // c is now InfInt(3)
However, the default operators will perform a clone to create a new object,
which is not very performant.
The *_destroy functions will not clone the object,
but will modify the original object in place.
You cannot create an InfInt object with no value.
If you perform an operation on an empty InfInt, it will panic.
Implementation details
Data is stored in a vector of u128 values. The longer the vector, the higher the computation cost.
The most expensive operation is fmt,
as it requires constructing a base 10 vector representation of the number.
Future versions may cache the resulting string representation
to improve performance.