\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;x \le -0.0031241993131199291:\\
\;\;\;\;\frac{x \cdot 1}{\frac{y}{y - z}}\\
\mathbf{elif}\;x \le -2.5442428760867874 \cdot 10^{-218}:\\
\;\;\;\;\left(x \cdot \left(y - z\right)\right) \cdot \frac{1}{y}\\
\mathbf{elif}\;x \le 3.83253612891536641 \cdot 10^{-156}:\\
\;\;\;\;\frac{x \cdot 1}{\frac{y}{y - z}}\\
\mathbf{elif}\;x \le 2.91543650117718941 \cdot 10^{-52}:\\
\;\;\;\;\frac{1}{\frac{y}{x \cdot \left(y - z\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 1}{\frac{y}{y - z}}\\
\end{array}double code(double x, double y, double z) {
return ((double) (((double) (x * ((double) (y - z)))) / y));
}
double code(double x, double y, double z) {
double VAR;
if ((x <= -0.003124199313119929)) {
VAR = ((double) (((double) (x * 1.0)) / ((double) (y / ((double) (y - z))))));
} else {
double VAR_1;
if ((x <= -2.5442428760867874e-218)) {
VAR_1 = ((double) (((double) (x * ((double) (y - z)))) * ((double) (1.0 / y))));
} else {
double VAR_2;
if ((x <= 3.8325361289153664e-156)) {
VAR_2 = ((double) (((double) (x * 1.0)) / ((double) (y / ((double) (y - z))))));
} else {
double VAR_3;
if ((x <= 2.9154365011771894e-52)) {
VAR_3 = ((double) (1.0 / ((double) (y / ((double) (x * ((double) (y - z))))))));
} else {
VAR_3 = ((double) (((double) (x * 1.0)) / ((double) (y / ((double) (y - z))))));
}
VAR_2 = VAR_3;
}
VAR_1 = VAR_2;
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.5 |
|---|---|
| Target | 3.1 |
| Herbie | 2.2 |
if x < -0.003124199313119929 or -2.5442428760867874e-218 < x < 3.8325361289153664e-156 or 2.9154365011771894e-52 < x Initial program 16.9
rmApplied *-un-lft-identity16.9
Applied associate-*r*16.9
Applied associate-/l*2.2
if -0.003124199313119929 < x < -2.5442428760867874e-218Initial program 2.2
rmApplied div-inv2.4
if 3.8325361289153664e-156 < x < 2.9154365011771894e-52Initial program 1.7
rmApplied clear-num1.8
Final simplification2.2
herbie shell --seed 2020114 +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))