Crates.io | decimal_fixes_mirror |
lib.rs | decimal_fixes_mirror |
version | 2.0.4-fix1.0.0 |
source | src |
created_at | 2020-11-25 23:46:08.842148 |
updated_at | 2020-11-25 23:46:08.842148 |
description | Decimal floating point arithmetic for Rust |
homepage | |
repository | https://github.com/probablykasper/decimal_fixes_mirror |
max_upload_size | |
id | 316487 |
size | 5,480,773 |
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!
.
let x = d128!(1.234);
let y = d128!(1.111);
let z = d128!(2.345);
assert_eq(x + y, z);
$ cargo build
$ ./target/debug/run-test decTest/decQuad.decTest