\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 r164761 = N;
double r164762 = 1.0;
double r164763 = r164761 + r164762;
double r164764 = atan(r164763);
double r164765 = atan(r164761);
double r164766 = r164764 - r164765;
return r164766;
}
double f(double N) {
double r164767 = 1.0;
double r164768 = 1.0;
double r164769 = N;
double r164770 = r164769 + r164767;
double r164771 = r164770 * r164769;
double r164772 = r164768 + r164771;
double r164773 = atan2(r164767, r164772);
return r164773;
}




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