\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 r772444 = x;
double r772445 = y;
double r772446 = r772444 * r772445;
double r772447 = z;
double r772448 = r772446 / r772447;
return r772448;
}
double f(double x, double y, double z) {
double r772449 = x;
double r772450 = y;
double r772451 = r772449 * r772450;
double r772452 = -inf.0;
bool r772453 = r772451 <= r772452;
double r772454 = 1.0;
double r772455 = z;
double r772456 = r772455 / r772450;
double r772457 = r772456 / r772449;
double r772458 = r772454 / r772457;
double r772459 = -2.510490940855015e-305;
bool r772460 = r772451 <= r772459;
double r772461 = r772451 / r772455;
double r772462 = 2.3541375655288775e-189;
bool r772463 = r772451 <= r772462;
double r772464 = r772449 / r772456;
double r772465 = 3.5319662921484826e+186;
bool r772466 = r772451 <= r772465;
double r772467 = r772466 ? r772461 : r772464;
double r772468 = r772463 ? r772464 : r772467;
double r772469 = r772460 ? r772461 : r772468;
double r772470 = r772453 ? r772458 : r772469;
return r772470;
}




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