| Crates.io | const-decimal |
| lib.rs | const-decimal |
| version | 0.3.0 |
| created_at | 2024-09-13 01:13:36.783073+00 |
| updated_at | 2024-10-13 13:59:13.101695+00 |
| description | Integer-backed decimals with constant precision |
| homepage | https://github.com/OliverNChalk/const-decimal |
| repository | https://github.com/OliverNChalk/const-decimal |
| max_upload_size | |
| id | 1373256 |
| size | 77,819 |
const-decimal is a fixed precision decimal backed by an underlying integer.
This means it can compute Add/Sub/Mul/Div* operations within it's range without
precision loss. This crate was created as there was no pre-existing crate that
offered these features for decimal numbers (fixed cannot represent decimals
with precision).
This is a fairly simple crate and is mainly intended to serve as a lossless representation of decimal values. While math operations are supported it is not intended to be a general purpose maths library.
* Division can of course truncate like normal division.
The goals in order of priority are: