paupino / rust-decimal

Decimal number implementation written in pure Rust suitable for financial and fixed-precision calculations.
https://docs.rs/rust_decimal/
MIT License
972 stars 177 forks source link

Fix negation with overflow #657

Closed benschulz closed 4 months ago

benschulz commented 4 months ago

Fixes an issue where i128::MIN would cause overflow.

paupino commented 4 months ago

This is a great catch, thank you. The blindness in the test is a worry - I see the u128 test is also blind so I'll likely fix that as part of this too.