\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -9.977639429899369989820721692045022376536 \cdot 10^{292} \lor \neg \left(x \cdot y \le -1.825173703048544803476102458184078598692 \cdot 10^{-96} \lor \neg \left(x \cdot y \le 2.361991935307828800783872424628048333578 \cdot 10^{-316}\right) \land x \cdot y \le 1.830819210750021062326979763016492837298 \cdot 10^{169}\right):\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\end{array}double f(double x, double y, double z) {
double r588608 = x;
double r588609 = y;
double r588610 = r588608 * r588609;
double r588611 = z;
double r588612 = r588610 / r588611;
return r588612;
}
double f(double x, double y, double z) {
double r588613 = x;
double r588614 = y;
double r588615 = r588613 * r588614;
double r588616 = -9.97763942989937e+292;
bool r588617 = r588615 <= r588616;
double r588618 = -1.8251737030485448e-96;
bool r588619 = r588615 <= r588618;
double r588620 = 2.3619919353078e-316;
bool r588621 = r588615 <= r588620;
double r588622 = !r588621;
double r588623 = 1.830819210750021e+169;
bool r588624 = r588615 <= r588623;
bool r588625 = r588622 && r588624;
bool r588626 = r588619 || r588625;
double r588627 = !r588626;
bool r588628 = r588617 || r588627;
double r588629 = z;
double r588630 = r588629 / r588614;
double r588631 = r588613 / r588630;
double r588632 = r588615 / r588629;
double r588633 = r588628 ? r588631 : r588632;
return r588633;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.2 |
|---|---|
| Target | 6.2 |
| Herbie | 0.8 |
if (* x y) < -9.97763942989937e+292 or -1.8251737030485448e-96 < (* x y) < 2.3619919353078e-316 or 1.830819210750021e+169 < (* x y) Initial program 15.3
rmApplied associate-/l*1.7
if -9.97763942989937e+292 < (* x y) < -1.8251737030485448e-96 or 2.3619919353078e-316 < (* x y) < 1.830819210750021e+169Initial program 0.3
Final simplification0.8
herbie shell --seed 2019194 +o rules:numerics
(FPCore (x y z)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, A"
:herbie-target
(if (< z -4.262230790519429e-138) (/ (* x y) z) (if (< z 1.7042130660650472e-164) (/ x (/ z y)) (* (/ x z) y)))
(/ (* x y) z))