\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 r112823 = N;
double r112824 = 1.0;
double r112825 = r112823 + r112824;
double r112826 = atan(r112825);
double r112827 = atan(r112823);
double r112828 = r112826 - r112827;
return r112828;
}
double f(double N) {
double r112829 = 1.0;
double r112830 = 1.0;
double r112831 = N;
double r112832 = r112831 + r112829;
double r112833 = r112832 * r112831;
double r112834 = r112830 + r112833;
double r112835 = atan2(r112829, r112834);
return r112835;
}




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