\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 r125196 = N;
double r125197 = 1.0;
double r125198 = r125196 + r125197;
double r125199 = atan(r125198);
double r125200 = atan(r125196);
double r125201 = r125199 - r125200;
return r125201;
}
double f(double N) {
double r125202 = 1.0;
double r125203 = 1.0;
double r125204 = N;
double r125205 = r125204 + r125202;
double r125206 = r125205 * r125204;
double r125207 = r125203 + r125206;
double r125208 = atan2(r125202, r125207);
return r125208;
}




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