TorchLean API

FloatLib.Numerics.Exact.Trigonometric.Atan2.Runtime

Exact comparisons for two-coordinate arctangent #

The input order is (x, y), giving the principal argument of x + i*y in (-π, π]. Ordinary comparisons share reduced arctangent and π enclosures across rounding boundaries. Comparisons in units of π use the exact rational quadrant shift and the pi-scaled arctangent comparator, including its rational special values.

Both comparators use zero as the value at the origin, matching Mathlib's totalized argument. Posit wrappers must reject (0, 0) before rounding, as required by the Posit Standard.

Reference #

Prepare comparisons of arg (x + i*y) with rational boundaries. The first levels enclosure depths are cached; refinement beyond that prefix remains unbounded.

Instances For

    Compare the principal argument of x + i*y with a rational radian boundary.

    Instances For

      Prepare comparisons of arg (x + i*y) / π, using an exact rational quadrant shift. No rounded approximation to π and no intermediate rounding enters the comparison.

      Instances For

        Compare the principal argument of x + i*y, divided by π, with a rational boundary.

        Instances For