\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 r104447 = N;
double r104448 = 1.0;
double r104449 = r104447 + r104448;
double r104450 = atan(r104449);
double r104451 = atan(r104447);
double r104452 = r104450 - r104451;
return r104452;
}
double f(double N) {
double r104453 = 1.0;
double r104454 = 1.0;
double r104455 = N;
double r104456 = r104455 + r104453;
double r104457 = r104456 * r104455;
double r104458 = r104454 + r104457;
double r104459 = atan2(r104453, r104458);
return r104459;
}




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