\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 r163932 = N;
double r163933 = 1.0;
double r163934 = r163932 + r163933;
double r163935 = atan(r163934);
double r163936 = atan(r163932);
double r163937 = r163935 - r163936;
return r163937;
}
double f(double N) {
double r163938 = 1.0;
double r163939 = 1.0;
double r163940 = N;
double r163941 = r163940 + r163938;
double r163942 = r163941 * r163940;
double r163943 = r163939 + r163942;
double r163944 = atan2(r163938, r163943);
return r163944;
}




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