decimal icon indicating copy to clipboard operation
decimal copied to clipboard

Decimal Floating Point arithmetic for rust

Results 28 decimal issues
Sort by recently updated
recently updated
newest added

It looks like d128 incorrectly interprets precision as width when printing values, for example: `let test: d128 = d128::from_str("123.12345678").unwrap();` `print!("Should print 123.12345678, actual output: {:.8}", test);` This code prints 123.1234...

It was calling into decNumberExp with the wrong signature, so it didn't work at all. I also fixed the decNumber tests for exp so that they'll actually run if point...

It would be useful to be able to be able to set the rounding mode to use in quantize. This pull request adds a new `d128::quantize_with_mode` function that allows exactly...

Would it be possible to implement the `Float`, `Zero` and `One` traits from the `num` crate? I know some other libraries (e.g. `nalgebra`) use these as trait requirements for doing...

The goal is to be able to deserialize json like {a: 1, b: 2.5} into {a: d128, b: d128} using serde. I think something "opt-in" is needed, at least for...

Currenty only two methods new() are present, from i32 and u32. Is there any reason why? It should be psosible to provide more overloads? for f64 and at least for...

Fixes #7. A new crate is located in the decimal-macros folder that provides the constant macro. It uses a plugin to compile the d128 literals.

Hello. I noticed that the latest commit is from more than 3 years ago. And no activity going on. Is this crate still maintained and/or alive? Thanks.