\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 r13731412 = N;
double r13731413 = 1.0;
double r13731414 = r13731412 + r13731413;
double r13731415 = atan(r13731414);
double r13731416 = atan(r13731412);
double r13731417 = r13731415 - r13731416;
return r13731417;
}
double f(double N) {
double r13731418 = 1.0;
double r13731419 = N;
double r13731420 = r13731419 + r13731418;
double r13731421 = fma(r13731419, r13731420, r13731418);
double r13731422 = atan2(r13731418, r13731421);
return r13731422;
}




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)))