\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;z \le -1.566982273345146481292091546063448334105 \cdot 10^{71}:\\
\;\;\;\;\frac{x}{y} \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 \cdot \left(1 - \frac{z}{y}\right)\right)\\
\end{array}double f(double x, double y, double z) {
double r825615 = x;
double r825616 = y;
double r825617 = z;
double r825618 = r825616 - r825617;
double r825619 = r825615 * r825618;
double r825620 = r825619 / r825616;
return r825620;
}
double f(double x, double y, double z) {
double r825621 = z;
double r825622 = -1.5669822733451465e+71;
bool r825623 = r825621 <= r825622;
double r825624 = x;
double r825625 = y;
double r825626 = r825624 / r825625;
double r825627 = r825625 - r825621;
double r825628 = r825626 * r825627;
double r825629 = 1.0;
double r825630 = r825621 / r825625;
double r825631 = r825629 - r825630;
double r825632 = r825629 * r825631;
double r825633 = r825624 * r825632;
double r825634 = r825623 ? r825628 : r825633;
return r825634;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.2 |
|---|---|
| Target | 3.0 |
| Herbie | 3.5 |
if z < -1.5669822733451465e+71Initial program 12.1
rmApplied associate-/l*8.6
rmApplied associate-/r/11.7
if -1.5669822733451465e+71 < z Initial program 12.3
rmApplied *-un-lft-identity12.3
Applied times-frac2.0
Simplified2.0
rmApplied *-un-lft-identity2.0
Applied *-un-lft-identity2.0
Applied times-frac2.0
Simplified2.0
Simplified2.0
Final simplification3.5
herbie shell --seed 2020001
(FPCore (x y z)
:name "Diagrams.Backend.Cairo.Internal:setTexture from diagrams-cairo-1.3.0.3"
:precision binary64
: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))