\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 r164433 = N;
double r164434 = 1.0;
double r164435 = r164433 + r164434;
double r164436 = atan(r164435);
double r164437 = atan(r164433);
double r164438 = r164436 - r164437;
return r164438;
}
double f(double N) {
double r164439 = 1.0;
double r164440 = 1.0;
double r164441 = N;
double r164442 = r164441 + r164439;
double r164443 = r164442 * r164441;
double r164444 = r164440 + r164443;
double r164445 = atan2(r164439, r164444);
return r164445;
}




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