\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 r136018 = N;
double r136019 = 1.0;
double r136020 = r136018 + r136019;
double r136021 = atan(r136020);
double r136022 = atan(r136018);
double r136023 = r136021 - r136022;
return r136023;
}
double f(double N) {
double r136024 = 1.0;
double r136025 = 1.0;
double r136026 = N;
double r136027 = r136026 + r136024;
double r136028 = r136027 * r136026;
double r136029 = r136025 + r136028;
double r136030 = atan2(r136024, r136029);
return r136030;
}




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