\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{y} = -\infty:\\
\;\;\;\;\frac{x}{\frac{y}{y - z}}\\
\mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{y} \le -7.035752593527431893945155653212148797057 \cdot 10^{97}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{y}\\
\mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{y} \le 2.566980890461996323345451498436663106865 \cdot 10^{-126}:\\
\;\;\;\;\frac{x}{\frac{y}{y - z}}\\
\mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{y} \le 3.205146683618994452349289842865450278396 \cdot 10^{270}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y - z}{y}\\
\end{array}double f(double x, double y, double z) {
double r855509 = x;
double r855510 = y;
double r855511 = z;
double r855512 = r855510 - r855511;
double r855513 = r855509 * r855512;
double r855514 = r855513 / r855510;
return r855514;
}
double f(double x, double y, double z) {
double r855515 = x;
double r855516 = y;
double r855517 = z;
double r855518 = r855516 - r855517;
double r855519 = r855515 * r855518;
double r855520 = r855519 / r855516;
double r855521 = -inf.0;
bool r855522 = r855520 <= r855521;
double r855523 = r855516 / r855518;
double r855524 = r855515 / r855523;
double r855525 = -7.035752593527432e+97;
bool r855526 = r855520 <= r855525;
double r855527 = 2.5669808904619963e-126;
bool r855528 = r855520 <= r855527;
double r855529 = 3.2051466836189945e+270;
bool r855530 = r855520 <= r855529;
double r855531 = r855518 / r855516;
double r855532 = r855515 * r855531;
double r855533 = r855530 ? r855520 : r855532;
double r855534 = r855528 ? r855524 : r855533;
double r855535 = r855526 ? r855520 : r855534;
double r855536 = r855522 ? r855524 : r855535;
return r855536;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.7 |
|---|---|
| Target | 3.2 |
| Herbie | 0.7 |
if (/ (* x (- y z)) y) < -inf.0 or -7.035752593527432e+97 < (/ (* x (- y z)) y) < 2.5669808904619963e-126Initial program 16.2
rmApplied associate-/l*0.5
if -inf.0 < (/ (* x (- y z)) y) < -7.035752593527432e+97 or 2.5669808904619963e-126 < (/ (* x (- y z)) y) < 3.2051466836189945e+270Initial program 0.3
if 3.2051466836189945e+270 < (/ (* x (- y z)) y) Initial program 49.5
rmApplied *-un-lft-identity49.5
Applied times-frac3.2
Simplified3.2
Final simplification0.7
herbie shell --seed 2019350 +o rules:numerics
(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))