Dyadic approximation modulo one #
Rounding each summand down at precision B and reducing the sum modulo one gives a
rational point on the circle. The error is at most the number of summands times 2⁻ᴮ.
The estimate uses integer translates, so it applies to negative and zero targets as well.
This is the rounding step in Section 2, equation crt-circle-error, of
[OAI26f]. No complexity bound or prime-window estimate is claimed.
Main definitions #
Cslib.CircleClose: approximation up to an integer translate.Cslib.dyadicCircleApprox: sum of rounded fractions, reduced modulo one.
Main results #
Cslib.dyadicCircleApprox_close: the approximation error, including negative targets.
References #
- [OAI26f], Section 2, proof of Sign from residues.
Two rational numbers differ by less than ε, up to an integer translate.
The dyadic circle approximation is the fractional part of the unwrapped rounded sum.
The approximation is represented in the half-open unit interval.
The unwrapped rounded sum underestimates the sum, by at most one unit per summand.
Rounding a sum congruent to any rational target gives a circular approximation. The target may be negative or zero; no choice of its representative is required.
Zero summands have zero approximation, at every precision.