\frac{x \cdot \left(y + z\right)}{z}\frac{x}{\frac{z}{y + z}}double f(double x, double y, double z) {
double r277937 = x;
double r277938 = y;
double r277939 = z;
double r277940 = r277938 + r277939;
double r277941 = r277937 * r277940;
double r277942 = r277941 / r277939;
return r277942;
}
double f(double x, double y, double z) {
double r277943 = x;
double r277944 = z;
double r277945 = y;
double r277946 = r277945 + r277944;
double r277947 = r277944 / r277946;
double r277948 = r277943 / r277947;
return r277948;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.3 |
|---|---|
| Target | 3.1 |
| Herbie | 3.1 |
if z < 1.277387360816594e-224Initial program 12.3
rmApplied associate-/l*3.9
if 1.277387360816594e-224 < z < 9.073765212035872e-20Initial program 4.8
Taylor expanded around 0 1.5
if 9.073765212035872e-20 < z Initial program 16.0
rmApplied *-un-lft-identity16.0
Applied times-frac0.1
Simplified0.1
Final simplification3.1
herbie shell --seed 1978988140
(FPCore (x y z)
:name "Numeric.SpecFunctions:choose from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(/ x (/ z (+ y z)))
(/ (* x (+ y z)) z))