\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 r137310 = N;
double r137311 = 1.0;
double r137312 = r137310 + r137311;
double r137313 = atan(r137312);
double r137314 = atan(r137310);
double r137315 = r137313 - r137314;
return r137315;
}
double f(double N) {
double r137316 = 1.0;
double r137317 = 1.0;
double r137318 = N;
double r137319 = r137318 + r137316;
double r137320 = r137319 * r137318;
double r137321 = r137317 + r137320;
double r137322 = atan2(r137316, r137321);
return r137322;
}




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