\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 r134356 = N;
double r134357 = 1.0;
double r134358 = r134356 + r134357;
double r134359 = atan(r134358);
double r134360 = atan(r134356);
double r134361 = r134359 - r134360;
return r134361;
}
double f(double N) {
double r134362 = 1.0;
double r134363 = 1.0;
double r134364 = N;
double r134365 = r134364 + r134362;
double r134366 = r134365 * r134364;
double r134367 = r134363 + r134366;
double r134368 = atan2(r134362, r134367);
return r134368;
}




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