\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 r75964 = N;
double r75965 = 1.0;
double r75966 = r75964 + r75965;
double r75967 = atan(r75966);
double r75968 = atan(r75964);
double r75969 = r75967 - r75968;
return r75969;
}
double f(double N) {
double r75970 = 1.0;
double r75971 = 1.0;
double r75972 = N;
double r75973 = r75972 + r75970;
double r75974 = r75973 * r75972;
double r75975 = r75971 + r75974;
double r75976 = atan2(r75970, r75975);
return r75976;
}




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