\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 r149284 = N;
double r149285 = 1.0;
double r149286 = r149284 + r149285;
double r149287 = atan(r149286);
double r149288 = atan(r149284);
double r149289 = r149287 - r149288;
return r149289;
}
double f(double N) {
double r149290 = 1.0;
double r149291 = 1.0;
double r149292 = N;
double r149293 = r149292 + r149290;
double r149294 = r149293 * r149292;
double r149295 = r149291 + r149294;
double r149296 = atan2(r149290, r149295);
return r149296;
}




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