\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 r103486 = N;
double r103487 = 1.0;
double r103488 = r103486 + r103487;
double r103489 = atan(r103488);
double r103490 = atan(r103486);
double r103491 = r103489 - r103490;
return r103491;
}
double f(double N) {
double r103492 = 1.0;
double r103493 = 1.0;
double r103494 = N;
double r103495 = r103494 + r103492;
double r103496 = r103495 * r103494;
double r103497 = r103493 + r103496;
double r103498 = atan2(r103492, r103497);
return r103498;
}




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