\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 r58979 = N;
double r58980 = 1.0;
double r58981 = r58979 + r58980;
double r58982 = atan(r58981);
double r58983 = atan(r58979);
double r58984 = r58982 - r58983;
return r58984;
}
double f(double N) {
double r58985 = 1.0;
double r58986 = 1.0;
double r58987 = N;
double r58988 = r58987 + r58985;
double r58989 = r58988 * r58987;
double r58990 = r58986 + r58989;
double r58991 = atan2(r58985, r58990);
return r58991;
}




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)))