pub(crate) fn rem_pio2_large(
x: &[f64],
y: &mut [f64],
e0: i32,
prec: usize,
) -> i32
Expand description
Return the last three digits of N with y = x - N*pi/2 so that |y| < pi/2.
The method is to compute the integer (mod 8) and fraction parts of (2/pi)*x without doing the full multiplication. In general we skip the part of the product that are known to be a huge integer ( more accurately, = 0 mod 8 ). Thus the number of operations are independent of the exponent of the input.