\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 r143521 = N;
double r143522 = 1.0;
double r143523 = r143521 + r143522;
double r143524 = atan(r143523);
double r143525 = atan(r143521);
double r143526 = r143524 - r143525;
return r143526;
}
double f(double N) {
double r143527 = 1.0;
double r143528 = 1.0;
double r143529 = N;
double r143530 = r143529 + r143527;
double r143531 = r143530 * r143529;
double r143532 = r143528 + r143531;
double r143533 = atan2(r143527, r143532);
return r143533;
}




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