\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 r134543 = N;
double r134544 = 1.0;
double r134545 = r134543 + r134544;
double r134546 = atan(r134545);
double r134547 = atan(r134543);
double r134548 = r134546 - r134547;
return r134548;
}
double f(double N) {
double r134549 = 1.0;
double r134550 = 1.0;
double r134551 = N;
double r134552 = r134551 + r134549;
double r134553 = r134552 * r134551;
double r134554 = r134550 + r134553;
double r134555 = atan2(r134549, r134554);
return r134555;
}




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