\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 r685618 = x;
double r685619 = y;
double r685620 = r685618 * r685619;
double r685621 = z;
double r685622 = r685620 / r685621;
return r685622;
}
double f(double x, double y, double z) {
double r685623 = x;
double r685624 = y;
double r685625 = r685623 * r685624;
double r685626 = -inf.0;
bool r685627 = r685625 <= r685626;
double r685628 = 1.0;
double r685629 = z;
double r685630 = r685629 / r685624;
double r685631 = r685630 / r685623;
double r685632 = r685628 / r685631;
double r685633 = -2.510490940855015e-305;
bool r685634 = r685625 <= r685633;
double r685635 = r685625 / r685629;
double r685636 = 2.3541375655288775e-189;
bool r685637 = r685625 <= r685636;
double r685638 = r685623 / r685630;
double r685639 = 3.5319662921484826e+186;
bool r685640 = r685625 <= r685639;
double r685641 = r685640 ? r685635 : r685638;
double r685642 = r685637 ? r685638 : r685641;
double r685643 = r685634 ? r685635 : r685642;
double r685644 = r685627 ? r685632 : r685643;
return r685644;
}




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))