\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 r792412 = x;
double r792413 = y;
double r792414 = z;
double r792415 = r792413 - r792414;
double r792416 = r792412 * r792415;
double r792417 = r792416 / r792413;
return r792417;
}
double f(double x, double y, double z) {
double r792418 = x;
double r792419 = y;
double r792420 = z;
double r792421 = r792419 - r792420;
double r792422 = r792418 * r792421;
double r792423 = r792422 / r792419;
double r792424 = -inf.0;
bool r792425 = r792423 <= r792424;
double r792426 = r792419 / r792421;
double r792427 = r792418 / r792426;
double r792428 = -7.035752593527432e+97;
bool r792429 = r792423 <= r792428;
double r792430 = 2.5669808904619963e-126;
bool r792431 = r792423 <= r792430;
double r792432 = 3.2051466836189945e+270;
bool r792433 = r792423 <= r792432;
double r792434 = r792421 / r792419;
double r792435 = r792418 * r792434;
double r792436 = r792433 ? r792423 : r792435;
double r792437 = r792431 ? r792427 : r792436;
double r792438 = r792429 ? r792423 : r792437;
double r792439 = r792425 ? r792427 : r792438;
return r792439;
}




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