Expand description
Deterministic fixed-point arithmetic for financial computation.
This crate provides Decimal, a 128-bit decimal type with configurable
rounding modes designed for financial calculations that must produce
identical results across all platforms.
Structs§
- Decimal
- A 128-bit decimal number with deterministic arithmetic.
Enums§
- Arithmetic
Error - Error returned when an arithmetic operation fails.
- Parse
Error - Error returned when parsing a decimal from a string fails.
- Rounding
Mode - Rounding mode for decimal operations.
Functions§
- approx_
eq - Compares two decimals with an absolute tolerance.
- approx_
eq_ relative - Compares two decimals with a relative tolerance.
- approx_
eq_ ulps - Compares two decimals with both absolute and relative tolerances.
- within_
basis_ points - Checks if a value is within a basis point tolerance of another value.
- within_
percentage - Checks if a value is within a percentage of another value.