\frac{x}{x \cdot x + 1}\frac{\frac{1}{\sqrt{1}}}{x + 1 \cdot \frac{1}{x}}double f(double x) {
double r66175 = x;
double r66176 = r66175 * r66175;
double r66177 = 1.0;
double r66178 = r66176 + r66177;
double r66179 = r66175 / r66178;
return r66179;
}
double f(double x) {
double r66180 = 1.0;
double r66181 = sqrt(r66180);
double r66182 = r66180 / r66181;
double r66183 = x;
double r66184 = 1.0;
double r66185 = r66180 / r66183;
double r66186 = r66184 * r66185;
double r66187 = r66183 + r66186;
double r66188 = r66182 / r66187;
return r66188;
}




Bits error versus x
Results
| Original | 14.4 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 14.4
rmApplied add-sqr-sqrt14.4
Applied associate-/r*14.3
rmApplied *-un-lft-identity14.3
Applied sqrt-prod14.3
Applied *-un-lft-identity14.3
Applied times-frac14.3
Applied associate-/l*14.4
Simplified14.4
Taylor expanded around 0 0.1
Final simplification0.1
herbie shell --seed 2020045
(FPCore (x)
:name "x / (x^2 + 1)"
:precision binary64
:herbie-target
(/ 1 (+ x (/ 1 x)))
(/ x (+ (* x x) 1)))