big_num 0.1.0

A big number implement in rust
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 105.48 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.62 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • a1393323447

Big Num

This crate provides:

  • BigInt: Immutable arbitrary-precision integers. All operations behave as if BigInt were represented in two's-complement notation.
  • BigDec: Immutable, arbitrary-precision signed decimal numbers. A BigDecimal consists of an arbitrary precision integer unscaled value and a 32-bit integer scale. (Coming Soon)

Example

use big_num::BigInt;

let a: BigInt = "10000000000000".into();
let b: BigInt = "900000000000".into();
println!("a = {}", a);      
println!("a + b = {}", &a + &b);
println!("a - b = {}", &a - &b);
println!("a * b = {}", &a * &b);
println!("a / b = {}", &a / &b);
println!("a % b = {}", &a % &b);
println!("a << 10 = {}", &a << 10);
println!("a >> 10 = {}", &a >> 10);