\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{y} \le -6.083035639847637607654497125773830646304 \cdot 10^{292}:\\
\;\;\;\;\frac{\frac{x}{\sqrt{\frac{y}{y - z}}}}{\sqrt{\frac{y}{y - z}}}\\
\mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{y} \le -8.175248265444713739055182742884957439272 \cdot 10^{123}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{y}\\
\mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{y} \le 4597572249704838144:\\
\;\;\;\;\frac{x}{\frac{y}{y - z}}\\
\mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{y} \le 1.095545649072277509917652984108949902858 \cdot 10^{260}:\\
\;\;\;\;\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 r50084772 = x;
double r50084773 = y;
double r50084774 = z;
double r50084775 = r50084773 - r50084774;
double r50084776 = r50084772 * r50084775;
double r50084777 = r50084776 / r50084773;
return r50084777;
}
double f(double x, double y, double z) {
double r50084778 = x;
double r50084779 = y;
double r50084780 = z;
double r50084781 = r50084779 - r50084780;
double r50084782 = r50084778 * r50084781;
double r50084783 = r50084782 / r50084779;
double r50084784 = -6.083035639847638e+292;
bool r50084785 = r50084783 <= r50084784;
double r50084786 = r50084779 / r50084781;
double r50084787 = sqrt(r50084786);
double r50084788 = r50084778 / r50084787;
double r50084789 = r50084788 / r50084787;
double r50084790 = -8.175248265444714e+123;
bool r50084791 = r50084783 <= r50084790;
double r50084792 = 4.597572249704838e+18;
bool r50084793 = r50084783 <= r50084792;
double r50084794 = r50084778 / r50084786;
double r50084795 = 1.0955456490722775e+260;
bool r50084796 = r50084783 <= r50084795;
double r50084797 = r50084796 ? r50084783 : r50084794;
double r50084798 = r50084793 ? r50084794 : r50084797;
double r50084799 = r50084791 ? r50084783 : r50084798;
double r50084800 = r50084785 ? r50084789 : r50084799;
return r50084800;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.6 |
|---|---|
| Target | 2.8 |
| Herbie | 1.5 |
if (/ (* x (- y z)) y) < -6.083035639847638e+292Initial program 57.7
rmApplied associate-/l*1.0
rmApplied add-sqr-sqrt8.5
Applied associate-/r*8.5
if -6.083035639847638e+292 < (/ (* x (- y z)) y) < -8.175248265444714e+123 or 4.597572249704838e+18 < (/ (* x (- y z)) y) < 1.0955456490722775e+260Initial program 0.2
if -8.175248265444714e+123 < (/ (* x (- y z)) y) < 4.597572249704838e+18 or 1.0955456490722775e+260 < (/ (* x (- y z)) y) Initial program 11.7
rmApplied associate-/l*1.1
Final simplification1.5
herbie shell --seed 2019174
(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))