\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 r93921 = N;
double r93922 = 1.0;
double r93923 = r93921 + r93922;
double r93924 = atan(r93923);
double r93925 = atan(r93921);
double r93926 = r93924 - r93925;
return r93926;
}
double f(double N) {
double r93927 = 1.0;
double r93928 = 1.0;
double r93929 = N;
double r93930 = r93929 + r93927;
double r93931 = r93930 * r93929;
double r93932 = r93928 + r93931;
double r93933 = atan2(r93927, r93932);
return r93933;
}




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