bigdecimal-rs
bigdecimal-rs copied to clipboard
Arbitrary precision decimal crate for Rust
### pow: Fix nonstd build, and build with older versions Directly build stdlib::num::NonZeroU64 with new instead of using try_into, stub out println! in tests. Also avoid using ilog2 and div_ceil....
Version 0.4.8. Values that round up to a power of 10 do not have the same scientific notation as values that round down, or round to a non power of...
The code ```rust use bigdecimal::BigDecimal; use std::str::FromStr; fn main() { let val = BigDecimal::from_str("783669641.2652893066406250000").unwrap(); let rounded = val.round(14); println!("{}", rounded); } ``` Outputs ``` 783669641.2652893066406200000 ^ ``` There should be...
This feels very problematic to me and is causing me to have to hash `BigDecimal` values using a different technique than their real `Hash` impl. ```rs #[test] fn big_decimal_hash_issue() {...
I tried to run the testsuite on an i386 machine, and got some test failures, the first one looks like a typical loss of precision problem that is common on...
I know that struct fields can be serialize to numbers use `#[serde(with = "bigdecimal::serde::json_num")]`. but how to do that on maps like: `HashMap`? How to serialize it to `{"number": 123.456}`?