\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 r135491 = N;
double r135492 = 1.0;
double r135493 = r135491 + r135492;
double r135494 = atan(r135493);
double r135495 = atan(r135491);
double r135496 = r135494 - r135495;
return r135496;
}
double f(double N) {
double r135497 = 1.0;
double r135498 = 1.0;
double r135499 = N;
double r135500 = r135499 + r135497;
double r135501 = r135500 * r135499;
double r135502 = r135498 + r135501;
double r135503 = atan2(r135497, r135502);
return r135503;
}




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