\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 r250466 = x;
double r250467 = y;
double r250468 = z;
double r250469 = r250467 + r250468;
double r250470 = r250466 * r250469;
double r250471 = r250470 / r250468;
return r250471;
}
double f(double x, double y, double z) {
double r250472 = x;
double r250473 = cbrt(r250472);
double r250474 = r250473 * r250473;
double r250475 = z;
double r250476 = cbrt(r250475);
double r250477 = r250476 * r250476;
double r250478 = r250474 / r250477;
double r250479 = y;
double r250480 = r250476 / r250479;
double r250481 = r250473 / r250480;
double r250482 = r250478 * r250481;
double r250483 = r250482 + r250472;
return r250483;
}




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