\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 r124766 = N;
double r124767 = 1.0;
double r124768 = r124766 + r124767;
double r124769 = atan(r124768);
double r124770 = atan(r124766);
double r124771 = r124769 - r124770;
return r124771;
}
double f(double N) {
double r124772 = 1.0;
double r124773 = 1.0;
double r124774 = N;
double r124775 = r124774 + r124772;
double r124776 = r124775 * r124774;
double r124777 = r124773 + r124776;
double r124778 = atan2(r124772, r124777);
return r124778;
}




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