\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 r162264 = N;
double r162265 = 1.0;
double r162266 = r162264 + r162265;
double r162267 = atan(r162266);
double r162268 = atan(r162264);
double r162269 = r162267 - r162268;
return r162269;
}
double f(double N) {
double r162270 = 1.0;
double r162271 = 1.0;
double r162272 = N;
double r162273 = r162272 + r162270;
double r162274 = r162273 * r162272;
double r162275 = r162271 + r162274;
double r162276 = atan2(r162270, r162275);
return r162276;
}




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 2020034
(FPCore (N)
:name "2atan (example 3.5)"
:precision binary64
:herbie-target
(atan (/ 1 (+ 1 (* N (+ N 1)))))
(- (atan (+ N 1)) (atan N)))