\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 r135756 = N;
double r135757 = 1.0;
double r135758 = r135756 + r135757;
double r135759 = atan(r135758);
double r135760 = atan(r135756);
double r135761 = r135759 - r135760;
return r135761;
}
double f(double N) {
double r135762 = 1.0;
double r135763 = 1.0;
double r135764 = N;
double r135765 = r135764 + r135762;
double r135766 = r135765 * r135764;
double r135767 = r135763 + r135766;
double r135768 = atan2(r135762, r135767);
return r135768;
}




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 2019353
(FPCore (N)
:name "2atan (example 3.5)"
:precision binary64
:herbie-target
(atan (/ 1 (+ 1 (* N (+ N 1)))))
(- (atan (+ N 1)) (atan N)))