\frac{x}{x \cdot x + 1}\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{x}{\mathsf{hypot}\left(1, x\right)}double f(double x) {
double r900097 = x;
double r900098 = r900097 * r900097;
double r900099 = 1.0;
double r900100 = r900098 + r900099;
double r900101 = r900097 / r900100;
return r900101;
}
double f(double x) {
double r900102 = 1.0;
double r900103 = x;
double r900104 = hypot(r900102, r900103);
double r900105 = r900102 / r900104;
double r900106 = r900103 / r900104;
double r900107 = r900105 * r900106;
return r900107;
}




Bits error versus x
Results
| Original | 15.2 |
|---|---|
| Target | 0.1 |
| Herbie | 0.0 |
Initial program 15.2
Simplified15.2
rmApplied clear-num15.2
rmApplied *-un-lft-identity15.2
Applied add-sqr-sqrt15.2
Applied times-frac15.2
Applied add-cube-cbrt15.2
Applied times-frac15.2
Simplified15.2
Simplified0.0
Final simplification0.0
herbie shell --seed 2019155 +o rules:numerics
(FPCore (x)
:name "x / (x^2 + 1)"
:herbie-target
(/ 1 (+ x (/ 1 x)))
(/ x (+ (* x x) 1)))