\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 r122468 = N;
double r122469 = 1.0;
double r122470 = r122468 + r122469;
double r122471 = atan(r122470);
double r122472 = atan(r122468);
double r122473 = r122471 - r122472;
return r122473;
}
double f(double N) {
double r122474 = 1.0;
double r122475 = 1.0;
double r122476 = N;
double r122477 = r122476 + r122474;
double r122478 = r122477 * r122476;
double r122479 = r122475 + r122478;
double r122480 = atan2(r122474, r122479);
return r122480;
}




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)))