\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 r301957 = x;
double r301958 = y;
double r301959 = z;
double r301960 = r301958 + r301959;
double r301961 = r301957 * r301960;
double r301962 = r301961 / r301959;
return r301962;
}
double f(double x, double y, double z) {
double r301963 = x;
double r301964 = cbrt(r301963);
double r301965 = r301964 * r301964;
double r301966 = z;
double r301967 = cbrt(r301966);
double r301968 = r301967 * r301967;
double r301969 = r301965 / r301968;
double r301970 = y;
double r301971 = r301967 / r301970;
double r301972 = r301964 / r301971;
double r301973 = r301969 * r301972;
double r301974 = r301973 + r301963;
return r301974;
}




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))