\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 r106960 = N;
double r106961 = 1.0;
double r106962 = r106960 + r106961;
double r106963 = atan(r106962);
double r106964 = atan(r106960);
double r106965 = r106963 - r106964;
return r106965;
}
double f(double N) {
double r106966 = 1.0;
double r106967 = 1.0;
double r106968 = N;
double r106969 = r106968 + r106966;
double r106970 = r106969 * r106968;
double r106971 = r106967 + r106970;
double r106972 = atan2(r106966, r106971);
return r106972;
}




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