\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot y}{z} \le -7.768603561893780181171682032240737260521 \cdot 10^{305}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;\frac{x \cdot y}{z} \le -5.989061428235972049640443908724325403146 \cdot 10^{-77}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;\frac{x \cdot y}{z} \le -0.0:\\
\;\;\;\;\frac{\frac{x}{\sqrt[3]{z} \cdot \sqrt[3]{z}}}{\frac{\sqrt[3]{z}}{y}}\\
\mathbf{elif}\;\frac{x \cdot y}{z} \le 3.534109248982643983253870825363988567111 \cdot 10^{298}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}double f(double x, double y, double z) {
double r395631 = x;
double r395632 = y;
double r395633 = r395631 * r395632;
double r395634 = z;
double r395635 = r395633 / r395634;
return r395635;
}
double f(double x, double y, double z) {
double r395636 = x;
double r395637 = y;
double r395638 = r395636 * r395637;
double r395639 = z;
double r395640 = r395638 / r395639;
double r395641 = -7.76860356189378e+305;
bool r395642 = r395640 <= r395641;
double r395643 = r395637 / r395639;
double r395644 = r395636 * r395643;
double r395645 = -5.989061428235972e-77;
bool r395646 = r395640 <= r395645;
double r395647 = -0.0;
bool r395648 = r395640 <= r395647;
double r395649 = cbrt(r395639);
double r395650 = r395649 * r395649;
double r395651 = r395636 / r395650;
double r395652 = r395649 / r395637;
double r395653 = r395651 / r395652;
double r395654 = 3.534109248982644e+298;
bool r395655 = r395640 <= r395654;
double r395656 = r395639 / r395637;
double r395657 = r395636 / r395656;
double r395658 = r395655 ? r395640 : r395657;
double r395659 = r395648 ? r395653 : r395658;
double r395660 = r395646 ? r395640 : r395659;
double r395661 = r395642 ? r395644 : r395660;
return r395661;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.4 |
|---|---|
| Target | 6.5 |
| Herbie | 1.7 |
if (/ (* x y) z) < -7.76860356189378e+305Initial program 62.6
rmApplied *-un-lft-identity62.6
Applied times-frac0.3
Simplified0.3
if -7.76860356189378e+305 < (/ (* x y) z) < -5.989061428235972e-77 or -0.0 < (/ (* x y) z) < 3.534109248982644e+298Initial program 2.2
if -5.989061428235972e-77 < (/ (* x y) z) < -0.0Initial program 5.7
rmApplied associate-/l*6.4
rmApplied *-un-lft-identity6.4
Applied add-cube-cbrt7.0
Applied times-frac7.0
Applied associate-/r*5.3
Simplified5.3
if 3.534109248982644e+298 < (/ (* x y) z) Initial program 57.5
rmApplied associate-/l*1.5
Final simplification1.7
herbie shell --seed 2019303 +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.70421306606504721e-164) (/ x (/ z y)) (* (/ x z) y)))
(/ (* x y) z))