\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 r90763 = N;
double r90764 = 1.0;
double r90765 = r90763 + r90764;
double r90766 = atan(r90765);
double r90767 = atan(r90763);
double r90768 = r90766 - r90767;
return r90768;
}
double f(double N) {
double r90769 = 1.0;
double r90770 = 1.0;
double r90771 = N;
double r90772 = r90771 + r90769;
double r90773 = r90772 * r90771;
double r90774 = r90770 + r90773;
double r90775 = atan2(r90769, r90774);
return r90775;
}




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