\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y = -\infty:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;x \cdot y \le -8.830735731568530122686813681294776173598 \cdot 10^{-179}:\\
\;\;\;\;\frac{1}{\frac{z}{x \cdot y}}\\
\mathbf{elif}\;x \cdot y \le -0.0:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;x \cdot y \le 4.105888948139835055715561985182230190785 \cdot 10^{262}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\frac{z}{x}}}{\frac{1}{y}}\\
\end{array}double f(double x, double y, double z) {
double r534426 = x;
double r534427 = y;
double r534428 = r534426 * r534427;
double r534429 = z;
double r534430 = r534428 / r534429;
return r534430;
}
double f(double x, double y, double z) {
double r534431 = x;
double r534432 = y;
double r534433 = r534431 * r534432;
double r534434 = -inf.0;
bool r534435 = r534433 <= r534434;
double r534436 = z;
double r534437 = r534432 / r534436;
double r534438 = r534431 * r534437;
double r534439 = -8.83073573156853e-179;
bool r534440 = r534433 <= r534439;
double r534441 = 1.0;
double r534442 = r534436 / r534433;
double r534443 = r534441 / r534442;
double r534444 = -0.0;
bool r534445 = r534433 <= r534444;
double r534446 = 4.105888948139835e+262;
bool r534447 = r534433 <= r534446;
double r534448 = r534433 / r534436;
double r534449 = r534436 / r534431;
double r534450 = r534441 / r534449;
double r534451 = r534441 / r534432;
double r534452 = r534450 / r534451;
double r534453 = r534447 ? r534448 : r534452;
double r534454 = r534445 ? r534438 : r534453;
double r534455 = r534440 ? r534443 : r534454;
double r534456 = r534435 ? r534438 : r534455;
return r534456;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.2 |
|---|---|
| Target | 6.2 |
| Herbie | 0.5 |
if (* x y) < -inf.0 or -8.83073573156853e-179 < (* x y) < -0.0Initial program 16.7
rmApplied *-un-lft-identity16.7
Applied times-frac0.6
Simplified0.6
if -inf.0 < (* x y) < -8.83073573156853e-179Initial program 0.2
rmApplied clear-num0.6
if -0.0 < (* x y) < 4.105888948139835e+262Initial program 3.4
if 4.105888948139835e+262 < (* x y) Initial program 43.1
rmApplied clear-num43.1
rmApplied associate-/r*0.4
rmApplied div-inv0.5
Applied associate-/r*0.4
Final simplification0.5
herbie shell --seed 2019235 +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))