Go to file
debris f8e4006ec1 ethereum-types refactor 2017-10-24 16:09:44 +08:00
benches Fix warnings 2017-08-22 15:18:33 +02:00
ethereum-types ethereum-types refactor 2017-10-24 16:09:44 +08:00
tests ethereum-types refactor 2017-10-24 16:09:44 +08:00
uint ethereum-types refactor 2017-10-24 16:09:44 +08:00
.gitignore mul and from optimizations 2017-08-17 17:25:00 +02:00
.travis.yml Merge pull request #34 from andrebeat/quickcheck-all-uints 2017-10-06 13:58:01 +02:00
Cargo.toml ethereum-types refactor 2017-10-24 16:09:44 +08:00
LICENSE-APACHE relicense under mit/apache2 2017-05-11 15:25:52 +02:00
LICENSE-MIT relicense under mit/apache2 2017-05-11 15:25:52 +02:00
README.md Update README.md 2017-09-22 12:02:06 +03:00

README.md

bigint

Build Status

API Documentation

Fixed-sized integers arithmetic

To specify a dependency, add to Cargo.toml

[dependencies]
bigint = "4"

Little example

extern crate bigint;
use bigint::U256;

fn main() {
	let mut val: U256 = 1023.into();
	for _ in 0..200 { val = val * 2.into() }
	assert_eq!(
		&format!("{}", val), 
		"1643897619276947051879427220465009342380213662639797070513307648"
	);
}

no_std crates

This crate has a feature, std, that is enabled by default. To use this crate in a no_std context, add the following to your Cargo.toml:

[dependencies]
bigint = { version = "4", default-features = false }