1 release (0 unstable)
Uses old Rust 2015
2.0.4-fix1.0.0 | Nov 25, 2020 |
---|
#21 in #128-bit
1MB
11K
SLoC
decimal
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 d128!
.
Example
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