\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 r165435 = N;
double r165436 = 1.0;
double r165437 = r165435 + r165436;
double r165438 = atan(r165437);
double r165439 = atan(r165435);
double r165440 = r165438 - r165439;
return r165440;
}
double f(double N) {
double r165441 = 1.0;
double r165442 = 1.0;
double r165443 = N;
double r165444 = r165443 + r165441;
double r165445 = r165444 * r165443;
double r165446 = r165442 + r165445;
double r165447 = atan2(r165441, r165446);
return r165447;
}




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