\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 r108963 = N;
double r108964 = 1.0;
double r108965 = r108963 + r108964;
double r108966 = atan(r108965);
double r108967 = atan(r108963);
double r108968 = r108966 - r108967;
return r108968;
}
double f(double N) {
double r108969 = 1.0;
double r108970 = 1.0;
double r108971 = N;
double r108972 = r108971 + r108969;
double r108973 = r108972 * r108971;
double r108974 = r108970 + r108973;
double r108975 = atan2(r108969, r108974);
return r108975;
}




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