mathhook_core/core/number.rs
1//! Number type for exact arithmetic
2//!
3//! Supports three representations:
4//! - Integer: Arbitrary precision integers (i64 with promotion to BigInt)
5//! - Rational: Exact fractions (numerator/denominator as BigInt)
6//! - Float: Floating-point approximations (f64)
7//!
8//! All arithmetic operations use checked arithmetic to detect overflow and
9//! automatically promote to BigInt or Rational types when needed. Float operations
10//! check for infinity and NaN to prevent silent error propagation.
11
12mod arithmetic;
13mod integer_ops;
14mod types;
15
16pub use types::Number;