Commit graph

1 commit

Author SHA1 Message Date
d709136e17 feat(python): Q16 fraction module for exact-arithmetic mutation exploration
q16_fraction.py uses Python's Fraction for the entire compute path:
  - No float, no truncation during intermediate operations
  - Quantize to Lean-compatible Q16_16 raw int only at to_raw()
  - from_float is the sole float boundary (I/O entry point)

Provides Q16 subclass of Fraction with:
  - Exact q16_mul/q16_div/q16_add/q16_sub (no rounding)
  - to_raw: truncation toward zero (matches FixedPoint.lean:298)
  - to_raw_rounded: round-half-up (alternative output)

Designed for value-set mutation sweeps: explore the full rational
space, quantize only at the final output boundary.
2026-07-07 09:33:27 -05:00