| Crates.io | pure_decimal |
| lib.rs | pure_decimal |
| version | 0.0.7 |
| created_at | 2018-01-14 12:24:32.593938+00 |
| updated_at | 2018-02-07 00:12:17.647732+00 |
| description | A decimal type with no NaN and Infinity |
| homepage | |
| repository | https://github.com/mmrath/pure_decimal |
| max_upload_size | |
| id | 46782 |
| size | 30,732 |
This crate provides a Decimal type which is a wrapper around decimal. This Decimal does not contain infinity and NaN. The objects of this type is can be used as keys in Maps and can be ordered.
#[macro_use]
extern crate pure_decimal;
fn main() {
let x = dec!(1.234);
let y = dec!(1.111);
let z = dec!(2.345);
assert_eq(x + y, z);
}