\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 r136948 = N;
double r136949 = 1.0;
double r136950 = r136948 + r136949;
double r136951 = atan(r136950);
double r136952 = atan(r136948);
double r136953 = r136951 - r136952;
return r136953;
}
double f(double N) {
double r136954 = 1.0;
double r136955 = 1.0;
double r136956 = N;
double r136957 = r136956 + r136954;
double r136958 = r136957 * r136956;
double r136959 = r136955 + r136958;
double r136960 = atan2(r136954, r136959);
return r136960;
}




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