Crate precision_core

Crate precision_core 

Source
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§

ArithmeticError
Error returned when an arithmetic operation fails.
ParseError
Error returned when parsing a decimal from a string fails.
RoundingMode
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.