16 releases (8 stable)
Uses old Rust 2015
|2.1.0||Mar 8, 2021|
|2.0.4||Dec 4, 2017|
|2.0.1||Nov 29, 2017|
|1.0.1||Jun 18, 2017|
|0.2.0||Dec 16, 2015|
#10 in #decimal
19,832 downloads per month
Used in 16 crates (15 directly)
Decimal Floating Point arithmetic for rust based on the decNumber library.
The library provides d128 which is a 128-bit decimal floating point number. You can use it as other primitive numbers in Rust. All operators are overloaded to allow ergonomic use of this type.
To emulate literals a macro is used
let x = d128!(1.234); let y = d128!(1.111); let z = d128!(2.345); assert_eq(x + y, z);
Running the decTest test suite
$ cargo build $ ./target/debug/run-test decTest/decQuad.decTest