\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 r86164 = N;
double r86165 = 1.0;
double r86166 = r86164 + r86165;
double r86167 = atan(r86166);
double r86168 = atan(r86164);
double r86169 = r86167 - r86168;
return r86169;
}
double f(double N) {
double r86170 = 1.0;
double r86171 = 1.0;
double r86172 = N;
double r86173 = r86172 + r86170;
double r86174 = r86173 * r86172;
double r86175 = r86171 + r86174;
double r86176 = atan2(r86170, r86175);
return r86176;
}




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