parity-common/README.md

19 lines
424 B
Markdown
Raw Normal View History

2016-12-22 03:07:45 -08:00
# bigint
2017-03-22 11:30:06 -07:00
[![Build Status](https://travis-ci.org/paritytech/bigint.svg?branch=master)](https://travis-ci.org/paritytech/bigint)
2017-03-15 06:23:05 -07:00
2016-12-22 03:07:45 -08:00
Fixed-sized integers arithmetic
```rust
extern crate bigint;
use bigint::{U256, Uint};
fn main() {
let mut val: U256 = 1023.into();
for _ in 0..200 { val = val * 2.into() }
2017-03-15 06:25:37 -07:00
assert_eq!(
&format!("{}", val),
"1643897619276947051879427220465009342380213662639797070513307648"
);
2016-12-22 03:07:45 -08:00
}