\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 r133642 = N;
double r133643 = 1.0;
double r133644 = r133642 + r133643;
double r133645 = atan(r133644);
double r133646 = atan(r133642);
double r133647 = r133645 - r133646;
return r133647;
}
double f(double N) {
double r133648 = 1.0;
double r133649 = 1.0;
double r133650 = N;
double r133651 = r133650 + r133648;
double r133652 = r133651 * r133650;
double r133653 = r133649 + r133652;
double r133654 = atan2(r133648, r133653);
return r133654;
}




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