Module arithmetic

Module arithmetic 

Source
Expand description

Exact arithmetic for Atlas computations

This module provides exact rational arithmetic with NO floating point. All computations use exact integers and rationals to preserve mathematical structure.

§Key Types

  • Rational - Exact rational numbers (alias for Ratio<i64>)
  • HalfInteger - Half-integers for E₈ coordinates (multiples of 1/2)
  • Vector8 - 8-dimensional vectors with exact coordinates
  • RationalMatrix - Matrices with exact rational entries (for Weyl groups)

§Design Principles

  1. No floating point - All arithmetic is exact
  2. Fraction preservation - Rationals never lose precision
  3. Overflow detection - All operations check for overflow
  4. Type safety - Prevent mixing incompatible number types

Structs§

HalfInteger
Half-integer: numbers of the form n/2 where n ∈ ℤ
RationalMatrix
Matrix with exact rational entries
RationalVector
N-dimensional vector with exact rational coordinates
Vector8
8-dimensional vector with exact coordinates

Type Aliases§

Rational
Exact rational number (fraction)