fn redupif64(x: f64) f64 x: f6457
58
59
60
61
62
63
64
65
66
67
68
69
70
71fn redupif64(x: f64) f64 {
const DP1 = 3.14159265160560607910;
const DP2 = 1.98418714791870343106e-9;
const DP3 = 1.14423774522196636802e-17;
var t = x / math.pi;
if (t >= 0.0) {
t += 0.5;
} else {
t -= 0.5;
}
const u: f64 = @trunc(t);
return ((x - u * DP1) - u * DP2) - u * DP3;
}