Module largeint::largeint[][src]

Implements the LargeInt struct. Supported methods include addition, subtraction, multiplication, division (floor division), and remainder from floor division. Also includes getters and a compare method.

Structs

LargeInt

Arithmetic is carried out on instances of LargeInt. The scalar value is stored in a String and its sign in the enum Sign.

Enums

Compare

Used in the output of the compare method to distinguish between comparisons of LargeInts.

Sign

Represents the sign of a LargeInt.

Functions

new

Creates a new instance of LargeInt. It is strongly recommended that LargeInt creation is done through the new() function which will instantiate an instance of LargeInt safely, making the necessary corrections to the fields if necessary, or panicking if an invalid input was submitted. See above for examples of LargeInt creation.