\frac{x \cdot \left(y + z\right)}{z}\frac{x}{\frac{z}{y + z}}double f(double x, double y, double z) {
double r404542 = x;
double r404543 = y;
double r404544 = z;
double r404545 = r404543 + r404544;
double r404546 = r404542 * r404545;
double r404547 = r404546 / r404544;
return r404547;
}
double f(double x, double y, double z) {
double r404548 = x;
double r404549 = z;
double r404550 = y;
double r404551 = r404550 + r404549;
double r404552 = r404549 / r404551;
double r404553 = r404548 / r404552;
return r404553;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.4 |
|---|---|
| Target | 2.9 |
| Herbie | 2.9 |
if z < -1.463437553141257e-248 or 3.3308078359433153e-122 < z Initial program 12.9
rmApplied associate-/l*1.6
if -1.463437553141257e-248 < z < 3.3308078359433153e-122Initial program 9.5
Taylor expanded around 0 7.0
Final simplification2.9
herbie shell --seed 2019294
(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))