\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;y \le -1.876455341869721 \cdot 10^{-13}:\\
\;\;\;\;x \cdot \frac{y - z}{y}\\
\mathbf{elif}\;y \le 1.1367980230815625 \cdot 10^{-137}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y - z}{y}\\
\end{array}double f(double x, double y, double z) {
double r39723732 = x;
double r39723733 = y;
double r39723734 = z;
double r39723735 = r39723733 - r39723734;
double r39723736 = r39723732 * r39723735;
double r39723737 = r39723736 / r39723733;
return r39723737;
}
double f(double x, double y, double z) {
double r39723738 = y;
double r39723739 = -1.876455341869721e-13;
bool r39723740 = r39723738 <= r39723739;
double r39723741 = x;
double r39723742 = z;
double r39723743 = r39723738 - r39723742;
double r39723744 = r39723743 / r39723738;
double r39723745 = r39723741 * r39723744;
double r39723746 = 1.1367980230815625e-137;
bool r39723747 = r39723738 <= r39723746;
double r39723748 = r39723741 / r39723738;
double r39723749 = r39723743 * r39723748;
double r39723750 = r39723747 ? r39723749 : r39723745;
double r39723751 = r39723740 ? r39723745 : r39723750;
return r39723751;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 11.7 |
|---|---|
| Target | 2.9 |
| Herbie | 3.1 |
if y < -1.876455341869721e-13 or 1.1367980230815625e-137 < y Initial program 13.3
rmApplied *-un-lft-identity13.3
Applied times-frac0.6
Simplified0.6
if -1.876455341869721e-13 < y < 1.1367980230815625e-137Initial program 8.4
rmApplied associate-/l*8.3
rmApplied associate-/r/8.8
Final simplification3.1
herbie shell --seed 2019162
(FPCore (x y z)
:name "Diagrams.Backend.Cairo.Internal:setTexture from diagrams-cairo-1.3.0.3"
: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))