\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 r140853 = N;
double r140854 = 1.0;
double r140855 = r140853 + r140854;
double r140856 = atan(r140855);
double r140857 = atan(r140853);
double r140858 = r140856 - r140857;
return r140858;
}
double f(double N) {
double r140859 = 1.0;
double r140860 = 1.0;
double r140861 = N;
double r140862 = r140861 + r140859;
double r140863 = r140862 * r140861;
double r140864 = r140860 + r140863;
double r140865 = atan2(r140859, r140864);
return r140865;
}




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