\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 r520627 = N;
double r520628 = 1.0;
double r520629 = r520627 + r520628;
double r520630 = atan(r520629);
double r520631 = atan(r520627);
double r520632 = r520630 - r520631;
return r520632;
}
double f(double N) {
double r520633 = 1.0;
double r520634 = 1.0;
double r520635 = N;
double r520636 = r520635 + r520633;
double r520637 = r520636 * r520635;
double r520638 = r520634 + r520637;
double r520639 = atan2(r520633, r520638);
return r520639;
}




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