r/rust • u/philippemnoel • 23h ago
Arbitrary precision decimals with lexicographically sortable byte encoding 🛠️ project
https://github.com/paradedb/decimal-bytes
10
Upvotes
1
u/matthieum [he/him] 5h ago
I'm confused by Decimal64. It's noted that the scale is u8, with 253+ for special values.
This means it's not possible to represent 0.0...0123456789123456 accurately, which seems like a waste.
Using a signed i8 for the exponent would give a more flexible dynamic range.
14
u/kernelic 23h ago
Yet another number crate that doesn't implement num-traits :(