\frac{x \cdot \left(y + z\right)}{z}\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{\sqrt[3]{x}}{\frac{\sqrt[3]{z}}{y}} + xdouble f(double x, double y, double z) {
double r257604 = x;
double r257605 = y;
double r257606 = z;
double r257607 = r257605 + r257606;
double r257608 = r257604 * r257607;
double r257609 = r257608 / r257606;
return r257609;
}
double f(double x, double y, double z) {
double r257610 = x;
double r257611 = cbrt(r257610);
double r257612 = r257611 * r257611;
double r257613 = z;
double r257614 = cbrt(r257613);
double r257615 = r257614 * r257614;
double r257616 = r257612 / r257615;
double r257617 = y;
double r257618 = r257614 / r257617;
double r257619 = r257611 / r257618;
double r257620 = r257616 * r257619;
double r257621 = r257620 + r257610;
return r257621;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.3 |
|---|---|
| Target | 3.2 |
| Herbie | 1.8 |
Initial program 12.3
Simplified3.4
Taylor expanded around 0 4.6
Simplified5.2
rmApplied fma-udef5.2
Simplified4.6
rmApplied associate-/l*3.1
rmApplied *-un-lft-identity3.1
Applied add-cube-cbrt3.5
Applied times-frac3.6
Applied add-cube-cbrt3.6
Applied times-frac1.8
Simplified1.8
Final simplification1.8
herbie shell --seed 2019323 +o rules:numerics
(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))