bigdecimal-rs
                                
                                
                                
                                    bigdecimal-rs copied to clipboard
                            
                            
                            
                        Arbitrary precision decimal crate for Rust
Hi, there is a way to implement ```serialize_with``` when serialize a field on my custom struct
* Format code using "cargo fmt" * Add "cargo fmt" to travis config
``` fn main() { println!("{:?}", str::parse::("inf")); println!("{:?}", str::parse::("+inf")); println!("{:?}", str::parse::("-inf")); println!("{:?}", str::parse::("inf").map(|v| v * 10.0)); println!("{:?}", str::parse::("inf").map(|v| v * -10.0)); println!("{:?}", str::parse::("inf").map(|v| v * 0.0)); } ``` Outputs ``` Ok(inf)...
If i understand correctly, the maximum allowed precision is 100 even if I try to use `with_prec`. This is a very low number. I am trying to make a program...
How about to add `with_scale_round` method that round a value instead of dropping digits? I can implement this if you agree that is a good idea. Or maybe you have...
Typically in Rust, dividing by zero results in a panic. ```rust fn main() { let x = 1; let y = 0; x / y; } ``` ``` thread 'main'...
I am retrieving data from a postgres database with diesel. The table's schema is tagged with a `Numeric` meta-type, which I deserializing in to BigDecimal: ``` // diesel table definition...
There are many situations where the `scale` might overflow, while we don't have a configurable context to set its limits, it would be a better default for it to never...
I try this crate because `f64`'s 15 precision is not enough when I wanna use Rust to render some fractal picture. But because of the infinite precision of `BigDecimal`, it...