\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 r223305 = N;
double r223306 = 1.0;
double r223307 = r223305 + r223306;
double r223308 = atan(r223307);
double r223309 = atan(r223305);
double r223310 = r223308 - r223309;
return r223310;
}
double f(double N) {
double r223311 = 1.0;
double r223312 = 1.0;
double r223313 = N;
double r223314 = r223313 + r223311;
double r223315 = r223314 * r223313;
double r223316 = r223312 + r223315;
double r223317 = atan2(r223311, r223316);
return r223317;
}




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