Go to file
Nikolay Volf 43ec87a40a Update README.md 2017-09-22 12:01:31 +03:00
benches Fix warnings 2017-08-22 15:18:33 +02:00
examples fix error str 2017-05-21 19:35:25 +03:00
src Implemented trailing_zeros and leading_zeros 2017-09-06 14:41:40 +02:00
.gitignore mul and from optimizations 2017-08-17 17:25:00 +02:00
.travis.yml Update .travis.yml 2017-08-22 14:07:22 +03:00
Cargo.toml bump version 2017-09-06 15:02:50 +02: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:01:31 +03:00
build.rs replace license to apache in build.rs 2017-08-14 17:23:11 +03:00

README.md

bigint

Build Status

API Documentation

Fixed-sized integers arithmetic

Add a dependency

[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 }