\frac{x \cdot \left(y - z\right)}{y}x + \frac{\sqrt[3]{x}}{\frac{\sqrt[3]{y}}{z}} \cdot \frac{-\sqrt[3]{x}}{\frac{\sqrt[3]{y}}{\frac{\sqrt[3]{x}}{\sqrt[3]{y}}}}double f(double x, double y, double z) {
double r646264 = x;
double r646265 = y;
double r646266 = z;
double r646267 = r646265 - r646266;
double r646268 = r646264 * r646267;
double r646269 = r646268 / r646265;
return r646269;
}
double f(double x, double y, double z) {
double r646270 = x;
double r646271 = cbrt(r646270);
double r646272 = y;
double r646273 = cbrt(r646272);
double r646274 = z;
double r646275 = r646273 / r646274;
double r646276 = r646271 / r646275;
double r646277 = -r646271;
double r646278 = r646271 / r646273;
double r646279 = r646273 / r646278;
double r646280 = r646277 / r646279;
double r646281 = r646276 * r646280;
double r646282 = r646270 + r646281;
return r646282;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 11.9 |
|---|---|
| Target | 3.1 |
| Herbie | 1.7 |
Initial program 11.9
Simplified3.0
rmApplied fma-udef3.0
rmApplied *-un-lft-identity3.0
Applied add-cube-cbrt3.4
Applied times-frac3.4
Applied associate-*r*3.7
Simplified3.7
Taylor expanded around 0 4.6
Simplified2.8
rmApplied *-un-lft-identity2.8
Applied add-cube-cbrt3.2
Applied times-frac3.2
Applied add-cube-cbrt3.3
Applied distribute-rgt-neg-in3.3
Applied times-frac1.7
Simplified1.7
Final simplification1.7
herbie shell --seed 2019179 +o rules:numerics
(FPCore (x y z)
:name "Diagrams.Backend.Cairo.Internal:setTexture from diagrams-cairo-1.3.0.3"
:herbie-target
(if (< z -2.060202331921739e+104) (- x (/ (* z x) y)) (if (< z 1.6939766013828526e+213) (/ x (/ y (- y z))) (* (- y z) (/ x y))))
(/ (* x (- y z)) y))