\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y = -\infty:\\
\;\;\;\;\frac{1}{\frac{\frac{z}{y}}{x}}\\
\mathbf{elif}\;x \cdot y \le -2.51049094085501509 \cdot 10^{-305}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;x \cdot y \le 2.3541375655288775 \cdot 10^{-189}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;x \cdot y \le 3.53196629214848261 \cdot 10^{186}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}double f(double x, double y, double z) {
double r580749 = x;
double r580750 = y;
double r580751 = r580749 * r580750;
double r580752 = z;
double r580753 = r580751 / r580752;
return r580753;
}
double f(double x, double y, double z) {
double r580754 = x;
double r580755 = y;
double r580756 = r580754 * r580755;
double r580757 = -inf.0;
bool r580758 = r580756 <= r580757;
double r580759 = 1.0;
double r580760 = z;
double r580761 = r580760 / r580755;
double r580762 = r580761 / r580754;
double r580763 = r580759 / r580762;
double r580764 = -2.510490940855015e-305;
bool r580765 = r580756 <= r580764;
double r580766 = r580756 / r580760;
double r580767 = 2.3541375655288775e-189;
bool r580768 = r580756 <= r580767;
double r580769 = r580754 / r580761;
double r580770 = 3.5319662921484826e+186;
bool r580771 = r580756 <= r580770;
double r580772 = r580771 ? r580766 : r580769;
double r580773 = r580768 ? r580769 : r580772;
double r580774 = r580765 ? r580766 : r580773;
double r580775 = r580758 ? r580763 : r580774;
return r580775;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.2 |
|---|---|
| Target | 6.3 |
| Herbie | 0.3 |
if (* x y) < -inf.0Initial program 64.0
rmApplied associate-/l*0.3
rmApplied clear-num0.4
if -inf.0 < (* x y) < -2.510490940855015e-305 or 2.3541375655288775e-189 < (* x y) < 3.5319662921484826e+186Initial program 0.2
if -2.510490940855015e-305 < (* x y) < 2.3541375655288775e-189 or 3.5319662921484826e+186 < (* x y) Initial program 15.4
rmApplied associate-/l*0.6
Final simplification0.3
herbie shell --seed 2020062 +o rules:numerics
(FPCore (x y z)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, A"
:precision binary64
:herbie-target
(if (< z -4.262230790519429e-138) (/ (* x y) z) (if (< z 1.7042130660650472e-164) (/ x (/ z y)) (* (/ x z) y)))
(/ (* x y) z))