\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 r179786 = N;
double r179787 = 1.0;
double r179788 = r179786 + r179787;
double r179789 = atan(r179788);
double r179790 = atan(r179786);
double r179791 = r179789 - r179790;
return r179791;
}
double f(double N) {
double r179792 = 1.0;
double r179793 = 1.0;
double r179794 = N;
double r179795 = r179794 + r179792;
double r179796 = r179795 * r179794;
double r179797 = r179793 + r179796;
double r179798 = atan2(r179792, r179797);
return r179798;
}




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