Crate decimate [] [src]

Simple implementation of decimal floating point numbers in pure rust.

Numbers are represented as significand and exponent. Significand is stored in an integer that is specified as type parameter, so basic operations should be reasonably fast.

If a limited integer type is used for significand then nearly all operations may cause integer overflows. Overflows are handled in the same way as with standard integer types: debug builds panic, release builds silently ignore them.

The main use case for this library is fast, low-overhead operations with financial data when precision and magnitude of numbers are well known beforehand and there is need for inexact conversions into ints and standard floating types for faster number-crunching.

Structs

Decimal
ParseDecimalError

Type Definitions

Exp