\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 r561043 = x;
double r561044 = y;
double r561045 = r561043 * r561044;
double r561046 = z;
double r561047 = r561045 / r561046;
return r561047;
}
double f(double x, double y, double z) {
double r561048 = x;
double r561049 = y;
double r561050 = r561048 * r561049;
double r561051 = -inf.0;
bool r561052 = r561050 <= r561051;
double r561053 = z;
double r561054 = r561049 / r561053;
double r561055 = r561048 * r561054;
double r561056 = -8.83073573156853e-179;
bool r561057 = r561050 <= r561056;
double r561058 = 1.0;
double r561059 = r561053 / r561050;
double r561060 = r561058 / r561059;
double r561061 = -0.0;
bool r561062 = r561050 <= r561061;
double r561063 = 4.105888948139835e+262;
bool r561064 = r561050 <= r561063;
double r561065 = r561050 / r561053;
double r561066 = r561053 / r561048;
double r561067 = r561058 / r561066;
double r561068 = r561058 / r561049;
double r561069 = r561067 / r561068;
double r561070 = r561064 ? r561065 : r561069;
double r561071 = r561062 ? r561055 : r561070;
double r561072 = r561057 ? r561060 : r561071;
double r561073 = r561052 ? r561055 : r561072;
return r561073;
}




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