\frac{x \cdot \left(y - z\right)}{y}\frac{x \cdot \left(y - z\right)}{y}double f(double x, double y, double z) {
double r558556 = x;
double r558557 = y;
double r558558 = z;
double r558559 = r558557 - r558558;
double r558560 = r558556 * r558559;
double r558561 = r558560 / r558557;
return r558561;
}
double f(double x, double y, double z) {
double r558562 = x;
double r558563 = y;
double r558564 = z;
double r558565 = r558563 - r558564;
double r558566 = r558562 * r558565;
double r558567 = r558566 / r558563;
return r558567;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.2 |
|---|---|
| Target | 3.0 |
| Herbie | 12.2 |
Initial program 12.2
rmApplied *-un-lft-identity12.2
Applied times-frac3.0
Simplified3.0
rmApplied add-cube-cbrt4.2
Applied add-cube-cbrt3.5
Applied times-frac3.5
Applied associate-*r*1.1
Final simplification12.2
herbie shell --seed 2019294
(FPCore (x y z)
:name "Diagrams.Backend.Cairo.Internal:setTexture from diagrams-cairo-1.3.0.3"
:precision binary64
:herbie-target
(if (< z -2.060202331921739e104) (- x (/ (* z x) y)) (if (< z 1.69397660138285259e213) (/ x (/ y (- y z))) (* (- y z) (/ x y))))
(/ (* x (- y z)) y))