precision_core/
lib.rs

1#![no_std]
2#![forbid(unsafe_code)]
3#![deny(missing_docs)]
4
5//! Deterministic fixed-point arithmetic for financial computation.
6//!
7//! This crate provides [`Decimal`], a 128-bit decimal type with configurable
8//! rounding modes designed for financial calculations that must produce
9//! identical results across all platforms.
10
11mod decimal;
12mod error;
13mod rounding;
14mod tolerance;
15
16pub use decimal::Decimal;
17pub use error::{ArithmeticError, ParseError};
18pub use rounding::RoundingMode;
19pub use tolerance::{approx_eq, approx_eq_relative, approx_eq_ulps, within_basis_points, within_percentage};
20
21#[cfg(feature = "proptest")]
22mod proptest_impl;