Registry / utility / bigdecimal-rs

bigdecimal-rs

JSON →
library0.2.1rscratesunverified

Arbitrary precision decimal numbers for financial and scientific calculations.

# Cargo.toml [dependencies] bigdecimal-rs = "0.2.1"
INSTALL
IMPORT
SIG · BIGDECIMAL-RS
B
bigdecimal-rs
utilityrustv0.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BigDecimal
use bigdecimal::BigDecimal;

Creates and multiplies two BigDecimal values.

use bigdecimal::BigDecimal; use std::str::FromStr; fn main() { let a = BigDecimal::from_str("3.14159").unwrap(); let b = BigDecimal::from(2); println!("{}", a * b); }
Debug
Known issues
gotchaDefault precision may cause rounding in division
fix
Use `with_prec` or `set_precision` to control decimal places
affects: >=0.2.0
Upgrade
Version history
0.2.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
Meta
1
Amazon
1
Resources
bigdecimal-rs — cargo add bigdecimal-rs · libregistry