\tan^{-1} \left(N + 1\right) - \tan^{-1} N\tan^{-1}_* \frac{1}{\mathsf{fma}\left(N, \left(N + 1\right), 1\right)}double f(double N) {
double r15284881 = N;
double r15284882 = 1.0;
double r15284883 = r15284881 + r15284882;
double r15284884 = atan(r15284883);
double r15284885 = atan(r15284881);
double r15284886 = r15284884 - r15284885;
return r15284886;
}
double f(double N) {
double r15284887 = 1.0;
double r15284888 = N;
double r15284889 = r15284888 + r15284887;
double r15284890 = fma(r15284888, r15284889, r15284887);
double r15284891 = atan2(r15284887, r15284890);
return r15284891;
}




Bits error versus N
| Original | 14.9 |
|---|---|
| Target | 0.4 |
| Herbie | 0.4 |
Initial program 14.9
rmApplied diff-atan13.9
Simplified0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019121 +o rules:numerics
(FPCore (N)
:name "2atan (example 3.5)"
:herbie-target
(atan (/ 1 (+ 1 (* N (+ N 1)))))
(- (atan (+ N 1)) (atan N)))