\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 r92873 = N;
double r92874 = 1.0;
double r92875 = r92873 + r92874;
double r92876 = atan(r92875);
double r92877 = atan(r92873);
double r92878 = r92876 - r92877;
return r92878;
}
double f(double N) {
double r92879 = 1.0;
double r92880 = 1.0;
double r92881 = N;
double r92882 = r92881 + r92879;
double r92883 = r92882 * r92881;
double r92884 = r92880 + r92883;
double r92885 = atan2(r92879, r92884);
return r92885;
}




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