\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 r137029 = N;
double r137030 = 1.0;
double r137031 = r137029 + r137030;
double r137032 = atan(r137031);
double r137033 = atan(r137029);
double r137034 = r137032 - r137033;
return r137034;
}
double f(double N) {
double r137035 = 1.0;
double r137036 = 1.0;
double r137037 = N;
double r137038 = r137037 + r137035;
double r137039 = r137038 * r137037;
double r137040 = r137036 + r137039;
double r137041 = atan2(r137035, r137040);
return r137041;
}




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