\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{y} = -\infty:\\
\;\;\;\;x \cdot \frac{y - z}{y}\\
\mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{y} \le -1.1371960954834437 \cdot 10^{-94}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{y}\\
\mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{y} \le 1.89027997349105774 \cdot 10^{27}:\\
\;\;\;\;x \cdot \frac{y - z}{y}\\
\mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{y} \le 5.7188809436523363 \cdot 10^{295}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y}{y - z}}\\
\end{array}double f(double x, double y, double z) {
double r908493 = x;
double r908494 = y;
double r908495 = z;
double r908496 = r908494 - r908495;
double r908497 = r908493 * r908496;
double r908498 = r908497 / r908494;
return r908498;
}
double f(double x, double y, double z) {
double r908499 = x;
double r908500 = y;
double r908501 = z;
double r908502 = r908500 - r908501;
double r908503 = r908499 * r908502;
double r908504 = r908503 / r908500;
double r908505 = -inf.0;
bool r908506 = r908504 <= r908505;
double r908507 = r908502 / r908500;
double r908508 = r908499 * r908507;
double r908509 = -1.1371960954834437e-94;
bool r908510 = r908504 <= r908509;
double r908511 = 1.8902799734910577e+27;
bool r908512 = r908504 <= r908511;
double r908513 = 5.718880943652336e+295;
bool r908514 = r908504 <= r908513;
double r908515 = r908500 / r908502;
double r908516 = r908499 / r908515;
double r908517 = r908514 ? r908504 : r908516;
double r908518 = r908512 ? r908508 : r908517;
double r908519 = r908510 ? r908504 : r908518;
double r908520 = r908506 ? r908508 : r908519;
return r908520;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.6 |
|---|---|
| Target | 3.0 |
| Herbie | 0.2 |
if (/ (* x (- y z)) y) < -inf.0 or -1.1371960954834437e-94 < (/ (* x (- y z)) y) < 1.8902799734910577e+27Initial program 16.6
rmApplied *-un-lft-identity16.6
Applied times-frac0.1
Simplified0.1
if -inf.0 < (/ (* x (- y z)) y) < -1.1371960954834437e-94 or 1.8902799734910577e+27 < (/ (* x (- y z)) y) < 5.718880943652336e+295Initial program 0.2
if 5.718880943652336e+295 < (/ (* x (- y z)) y) Initial program 60.0
rmApplied associate-/l*0.6
Final simplification0.2
herbie shell --seed 2020056 +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))