alkis
decimal
C

Decimal Floating Point arithmetic for rust

Last updated Jul 3, 2026
81
Stars
27
Forks
27
Issues
+1
Stars/day
Attention Score
20
Language breakdown
No language data available.
โ–ธ Files click to expand
README

decimal

Travis Downloads Crates.io Apache license

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
๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท alkis/decimal ยท Updated daily from GitHub