Crates.io | bigint |
lib.rs | bigint |
version | 4.4.3 |
source | src |
created_at | 2016-12-22 10:47:51.968888 |
updated_at | 2020-05-07 13:12:46.043155 |
description | DEPRECATED: use uint instead |
homepage | http://parity.io |
repository | https://github.com/ethcore/bigint |
max_upload_size | |
id | 7721 |
size | 98,201 |
This crate is deprecated and will not be developed further. Users are invited to prefer the uint
crate instead.
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
cratesThis 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 }
bigint
is primarily distributed under the terms of both the MIT
license and the Apache License (Version 2.0), at your choice.
See LICENSE-APACHE, and LICENSE-MIT for details.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in bigint
by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.