\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 r105077 = N;
double r105078 = 1.0;
double r105079 = r105077 + r105078;
double r105080 = atan(r105079);
double r105081 = atan(r105077);
double r105082 = r105080 - r105081;
return r105082;
}
double f(double N) {
double r105083 = 1.0;
double r105084 = 1.0;
double r105085 = N;
double r105086 = r105085 + r105083;
double r105087 = r105086 * r105085;
double r105088 = r105084 + r105087;
double r105089 = atan2(r105083, r105088);
return r105089;
}




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