Module fixed_point

Module fixed_point 

Source
Expand description

Fixed-point arithmetic for precise decimal calculations without floating point errors

Structs§

FixedPoint
Fixed-point decimal representation using i64 with 8 decimal precision

Enums§

FixedPointError
Fixed-point arithmetic errors

Constants§

BASIS_POINTS_SCALE
Scale factor for basis points calculations (v3.0.0: tenths of bps, 100,000) Prior to v3.0.0, this was 10,000 (1bps units). Now 100,000 (0.1bps units). Migration: multiply all threshold_bps values by 10.
SCALE
Scale factor for 8 decimal places (100,000,000)