\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;y \le -5.854341452353873 \cdot 10^{-96}:\\
\;\;\;\;\frac{x}{\frac{1}{y - z} \cdot y}\\
\mathbf{elif}\;y \le 6.662421720446094 \cdot 10^{-114}:\\
\;\;\;\;\frac{\left(-x \cdot z\right) + x \cdot y}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y - z}{y}\\
\end{array}double f(double x, double y, double z) {
double r25670729 = x;
double r25670730 = y;
double r25670731 = z;
double r25670732 = r25670730 - r25670731;
double r25670733 = r25670729 * r25670732;
double r25670734 = r25670733 / r25670730;
return r25670734;
}
double f(double x, double y, double z) {
double r25670735 = y;
double r25670736 = -5.854341452353873e-96;
bool r25670737 = r25670735 <= r25670736;
double r25670738 = x;
double r25670739 = 1.0;
double r25670740 = z;
double r25670741 = r25670735 - r25670740;
double r25670742 = r25670739 / r25670741;
double r25670743 = r25670742 * r25670735;
double r25670744 = r25670738 / r25670743;
double r25670745 = 6.662421720446094e-114;
bool r25670746 = r25670735 <= r25670745;
double r25670747 = r25670738 * r25670740;
double r25670748 = -r25670747;
double r25670749 = r25670738 * r25670735;
double r25670750 = r25670748 + r25670749;
double r25670751 = r25670750 / r25670735;
double r25670752 = r25670741 / r25670735;
double r25670753 = r25670738 * r25670752;
double r25670754 = r25670746 ? r25670751 : r25670753;
double r25670755 = r25670737 ? r25670744 : r25670754;
return r25670755;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 11.4 |
|---|---|
| Target | 2.8 |
| Herbie | 3.0 |
if y < -5.854341452353873e-96Initial program 12.5
rmApplied associate-/l*0.4
rmApplied div-inv0.5
if -5.854341452353873e-96 < y < 6.662421720446094e-114Initial program 9.2
rmApplied sub-neg9.2
Applied distribute-rgt-in9.2
if 6.662421720446094e-114 < y Initial program 11.9
rmApplied *-un-lft-identity11.9
Applied times-frac0.9
Simplified0.9
Final simplification3.0
herbie shell --seed 2019158 +o rules:numerics
(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))