Bounds for the cached constants #
piLevel_halfPi_spec, piLevel_twoOverPi_spec and ln2Fixed_spec prove that the integers of
Constants.Runtime are lower bounds within two units of π/2, 2/π and log 2 times 2 ^ bits,
for every bits. The proofs read the integers as the endpoints of the proved enclosures piQuarter
and logSeries 2 (piQuarterBounds_eq, ln2Bounds_eq), bound the enclosure widths, and check
that the series degrees make those widths small at every precision.
Shifting such a bound to fewer bits keeps it within two units (LowerApprox.shiftRight), so every
read at any precision inherits the bound. The faithful read of log 2 is within one unit and its
grid read encloses it. The cache returns the uncached values (piLevelAt_eq, ln2FixedAt_eq).
value is a lower bound within two units of c * 2 ^ bits.
Instances For
The cache #
A cached ln2Fixed is the uncached one.
Shifted and rounded reads #
Shifting a lower bound within two units to fewer bits keeps it within two units.
A lower bound within two units at 64 more bits, raised by one unit and rounded to bits, is
within one unit.
Machin's enclosure of π/4 #
Binary splitting writes an arctangent partial sum as x times one unreduced fraction.
Machin's enclosure of π/4, with the radii of its two arctangent enclosures written out.
Machin's enclosure contains π/4 and has width at most 1 / (12 * 25 ^ degree).
piQuarterBounds degree denotes the endpoints of piQuarter degree.
π/2 and 2/π #
A floor quotient is a lower bound within two units of c * 2 ^ bits when the exact quotient is
lo * 2 ^ bits for an enclosure [lo, hi] of c of width at most 2 ^ -bits.
piLevel bits holds π / 2 * 2 ^ bits to within two units below.
piLevel bits holds 2 / π * 2 ^ bits to within two units below.
log 2 #
Binary splitting writes a partial sum of -log (1 - x) as one unreduced fraction.
Endpoints of logSeries 2, with the radii of both series in 1/3 written out.
ln2Bounds degree denotes the endpoints of logSeries 2 degree.
ln2Fixed bits is within two units below log 2 * 2 ^ bits.
Reads at any precision #
halfPiLower bits is within two units below π / 2 * 2 ^ bits.
twoOverPiLower bits is within two units below 2 / π * 2 ^ bits.
ln2Lower bits is within two units below log 2 * 2 ^ bits.
The grid read of log 2 encloses log 2.