\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 r133821 = N;
double r133822 = 1.0;
double r133823 = r133821 + r133822;
double r133824 = atan(r133823);
double r133825 = atan(r133821);
double r133826 = r133824 - r133825;
return r133826;
}
double f(double N) {
double r133827 = 1.0;
double r133828 = 1.0;
double r133829 = N;
double r133830 = r133829 + r133827;
double r133831 = r133830 * r133829;
double r133832 = r133828 + r133831;
double r133833 = atan2(r133827, r133832);
return r133833;
}




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