Skip to main content

pi_bounds_at_precision

Function pi_bounds_at_precision 

Source
pub fn pi_bounds_at_precision(precision_bits: usize) -> (Binary, Binary)
Expand description

Returns bounds on pi with at least precision_bits bits of accuracy.

This is a helper function for use in sin.rs and other places that need pi bounds without creating a full Computable.

The returned bounds (pi_lo, pi_hi) satisfy:

  • pi_lo <= true_pi <= pi_hi
  • (pi_hi - pi_lo) <= 2^(-precision_bits) approximately