\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{1}{\frac{\frac{z}{y}}{x}}\\
\end{array}double f(double x, double y, double z) {
double r834686 = x;
double r834687 = y;
double r834688 = r834686 * r834687;
double r834689 = z;
double r834690 = r834688 / r834689;
return r834690;
}
double f(double x, double y, double z) {
double r834691 = x;
double r834692 = y;
double r834693 = r834691 * r834692;
double r834694 = -inf.0;
bool r834695 = r834693 <= r834694;
double r834696 = 1.0;
double r834697 = z;
double r834698 = r834697 / r834692;
double r834699 = r834698 / r834691;
double r834700 = r834696 / r834699;
double r834701 = -2.510490940855015e-305;
bool r834702 = r834693 <= r834701;
double r834703 = r834693 / r834697;
double r834704 = 2.3541375655288775e-189;
bool r834705 = r834693 <= r834704;
double r834706 = r834691 / r834698;
double r834707 = 3.5319662921484826e+186;
bool r834708 = r834693 <= r834707;
double r834709 = r834708 ? r834703 : r834700;
double r834710 = r834705 ? r834706 : r834709;
double r834711 = r834702 ? r834703 : r834710;
double r834712 = r834695 ? r834700 : r834711;
return r834712;
}




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.0 or 3.5319662921484826e+186 < (* x y) Initial program 33.2
rmApplied associate-/l*1.1
rmApplied clear-num1.2
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-189Initial program 13.1
rmApplied associate-/l*0.3
Final simplification0.3
herbie shell --seed 2020062
(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))