Expand description
§gMath: Multi-Domain Fixed-Point Arithmetic Library
Zero-float, pure-Rust, consensus-safe fixed-point arithmetic with 18 transcendental functions computed at tier N+1 for full storage-tier precision.
Upgrading from 0.4.x: 0.5.0 is more accurate, and as a side effect some results end in a different final digit. This matters only if you store, hash, or compare results across versions. See CHANGELOG.md.
§Canonical API (FASC Pipeline)
use g_math::canonical::{gmath, evaluate};
let result = evaluate(&(gmath("1.5") + gmath("2.5")));
let exp_result = evaluate(&gmath("1.0").exp());§Profiles
Default is embedded. Set GMATH_PROFILE for higher precision:
embedded(default): Q64.64, 19 decimalsbalanced: Q128.128, 38 decimalsscientific: Q256.256, 77 decimals
Re-exports§
pub use fixed_point::canonical;
Modules§
- fixed_
point - Fixed-Point Arithmetic Module: Canonical FASC+UGOD Pipeline
Constants§
- VERSION
- Version information