\frac{x \cdot \left(y + z\right)}{z}\frac{x \cdot y}{z} + xdouble f(double x, double y, double z) {
double r380724 = x;
double r380725 = y;
double r380726 = z;
double r380727 = r380725 + r380726;
double r380728 = r380724 * r380727;
double r380729 = r380728 / r380726;
return r380729;
}
double f(double x, double y, double z) {
double r380730 = x;
double r380731 = y;
double r380732 = r380730 * r380731;
double r380733 = z;
double r380734 = r380732 / r380733;
double r380735 = r380734 + r380730;
return r380735;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.4 |
|---|---|
| Target | 2.8 |
| Herbie | 4.6 |
if x < -2.0176262665767197e+157 or 1.0279121045400385e-44 < x Initial program 23.5
Taylor expanded around 0 7.6
rmApplied associate-/l*0.2
rmApplied clear-num0.2
rmApplied div-inv0.3
Applied add-sqr-sqrt0.3
Applied times-frac0.3
Simplified0.3
Simplified0.3
if -2.0176262665767197e+157 < x < 1.0279121045400385e-44Initial program 6.8
Taylor expanded around 0 3.1
Final simplification4.6
herbie shell --seed 2019291
(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))