\tan^{-1} \left(N + 1\right) - \tan^{-1} N\tan^{-1}_* \frac{1}{\mathsf{fma}\left(N, \left(N + 1\right), 1\right)}double f(double N) {
double r2311441 = N;
double r2311442 = 1.0;
double r2311443 = r2311441 + r2311442;
double r2311444 = atan(r2311443);
double r2311445 = atan(r2311441);
double r2311446 = r2311444 - r2311445;
return r2311446;
}
double f(double N) {
double r2311447 = 1.0;
double r2311448 = N;
double r2311449 = r2311448 + r2311447;
double r2311450 = fma(r2311448, r2311449, r2311447);
double r2311451 = atan2(r2311447, r2311450);
return r2311451;
}




Bits error versus N
| Original | 15.0 |
|---|---|
| Target | 0.4 |
| Herbie | 0.4 |
Initial program 15.0
rmApplied diff-atan14.0
Simplified0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019128 +o rules:numerics
(FPCore (N)
:name "2atan (example 3.5)"
:herbie-target
(atan (/ 1 (+ 1 (* N (+ N 1)))))
(- (atan (+ N 1)) (atan N)))