\tan^{-1} \left(N + 1\right) - \tan^{-1} N\tan^{-1}_* \frac{1}{1 + \left(N + 1\right) \cdot N}double f(double N) {
double r174873 = N;
double r174874 = 1.0;
double r174875 = r174873 + r174874;
double r174876 = atan(r174875);
double r174877 = atan(r174873);
double r174878 = r174876 - r174877;
return r174878;
}
double f(double N) {
double r174879 = 1.0;
double r174880 = 1.0;
double r174881 = N;
double r174882 = r174881 + r174879;
double r174883 = r174882 * r174881;
double r174884 = r174880 + r174883;
double r174885 = atan2(r174879, r174884);
return r174885;
}




Bits error versus N
Results
| Original | 14.4 |
|---|---|
| Target | 0.4 |
| Herbie | 0.4 |
Initial program 14.4
rmApplied diff-atan13.3
Simplified0.4
Final simplification0.4
herbie shell --seed 2019346
(FPCore (N)
:name "2atan (example 3.5)"
:precision binary64
:herbie-target
(atan (/ 1 (+ 1 (* N (+ N 1)))))
(- (atan (+ N 1)) (atan N)))