\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 -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 r816112 = x;
double r816113 = y;
double r816114 = z;
double r816115 = r816113 - r816114;
double r816116 = r816112 * r816115;
double r816117 = r816116 / r816113;
return r816117;
}
double f(double x, double y, double z) {
double r816118 = x;
double r816119 = y;
double r816120 = z;
double r816121 = r816119 - r816120;
double r816122 = r816118 * r816121;
double r816123 = r816122 / r816119;
double r816124 = -inf.0;
bool r816125 = r816123 <= r816124;
double r816126 = r816119 / r816121;
double r816127 = r816118 / r816126;
double r816128 = -1.1371960954834437e-94;
bool r816129 = r816123 <= r816128;
double r816130 = 1.8902799734910577e+27;
bool r816131 = r816123 <= r816130;
double r816132 = r816121 / r816119;
double r816133 = r816118 * r816132;
double r816134 = 5.718880943652336e+295;
bool r816135 = r816123 <= r816134;
double r816136 = r816135 ? r816123 : r816127;
double r816137 = r816131 ? r816133 : r816136;
double r816138 = r816129 ? r816123 : r816137;
double r816139 = r816125 ? r816127 : r816138;
return r816139;
}




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 5.718880943652336e+295 < (/ (* x (- y z)) y) Initial program 61.9
rmApplied associate-/l*0.3
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 -1.1371960954834437e-94 < (/ (* x (- y z)) y) < 1.8902799734910577e+27Initial program 7.3
rmApplied *-un-lft-identity7.3
Applied times-frac0.1
Simplified0.1
Final simplification0.2
herbie shell --seed 2020056
(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))