decimal_fixes_mirror

Crates.iodecimal_fixes_mirror
lib.rsdecimal_fixes_mirror
version2.0.4-fix1.0.0
sourcesrc
created_at2020-11-25 23:46:08.842148
updated_at2020-11-25 23:46:08.842148
descriptionDecimal floating point arithmetic for Rust
homepage
repositoryhttps://github.com/probablykasper/decimal_fixes_mirror
max_upload_size
id316487
size5,480,773
Kasper (probablykasper)

documentation

https://probablykasper.github.io/decimal_fixes_mirror

README

decimal

Crates.io

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!.

Documentation

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
Commit count: 162

cargo fmt