\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 r136922 = N;
double r136923 = 1.0;
double r136924 = r136922 + r136923;
double r136925 = atan(r136924);
double r136926 = atan(r136922);
double r136927 = r136925 - r136926;
return r136927;
}
double f(double N) {
double r136928 = 1.0;
double r136929 = 1.0;
double r136930 = N;
double r136931 = r136930 + r136928;
double r136932 = r136931 * r136930;
double r136933 = r136929 + r136932;
double r136934 = atan2(r136928, r136933);
return r136934;
}




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