largeint
A library that implements the LargeInt
type, used for working with arbitrarily large integers in Rust!
Getting Started
First, add largeint to your dependencies:
[]
= "0.1.0"
Next, add this to the root of your crate to bring the contents of largeint into the scope of your project:
extern crate largeint;
use *;
You can then easily create many instances of LargeInt
:
let largeint1 = new;
let largeint2 = new;
let largeint3 = new;
An instance of LargeInt
contains two fields, the scalar value of the integer stored as a String
and the sign of the integer stored as the enum, Sign
, which can be Positive
, Negative
, or Unsigned
(note that 0
is the only integer that should be assigned Unsigned
).
Using new()
to create an instance of LargeInt
is highly recommmended as there are checks in place to ensure that the LargeInt
will be created properly.
Refer to the documentation for more details.
An Example
extern crate largeint;
use *;
License
This project is licensed under the MIT License - see LICENSE.md for more details.
Future Updates
Integer multiplication and division for LargeInt
is currently being developed and should be released sometime in the next few weeks in the "0.2.0"
update.