\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 r75613 = N;
double r75614 = 1.0;
double r75615 = r75613 + r75614;
double r75616 = atan(r75615);
double r75617 = atan(r75613);
double r75618 = r75616 - r75617;
return r75618;
}
double f(double N) {
double r75619 = 1.0;
double r75620 = 1.0;
double r75621 = N;
double r75622 = r75621 + r75619;
double r75623 = r75622 * r75621;
double r75624 = r75620 + r75623;
double r75625 = atan2(r75619, r75624);
return r75625;
}




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