\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 r162066 = N;
double r162067 = 1.0;
double r162068 = r162066 + r162067;
double r162069 = atan(r162068);
double r162070 = atan(r162066);
double r162071 = r162069 - r162070;
return r162071;
}
double f(double N) {
double r162072 = 1.0;
double r162073 = 1.0;
double r162074 = N;
double r162075 = r162074 + r162072;
double r162076 = r162075 * r162074;
double r162077 = r162073 + r162076;
double r162078 = atan2(r162072, r162077);
return r162078;
}




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