\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -1.7213465425126525 \cdot 10^{+172}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;x \cdot y \le -3.4578769880757935 \cdot 10^{-115}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;x \cdot y \le 1.3508925074839404 \cdot 10^{-153}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;x \cdot y \le 6.859366357865012 \cdot 10^{+120}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\end{array}double f(double x, double y, double z) {
double r35643422 = x;
double r35643423 = y;
double r35643424 = r35643422 * r35643423;
double r35643425 = z;
double r35643426 = r35643424 / r35643425;
return r35643426;
}
double f(double x, double y, double z) {
double r35643427 = x;
double r35643428 = y;
double r35643429 = r35643427 * r35643428;
double r35643430 = -1.7213465425126525e+172;
bool r35643431 = r35643429 <= r35643430;
double r35643432 = z;
double r35643433 = r35643428 / r35643432;
double r35643434 = r35643427 * r35643433;
double r35643435 = -3.4578769880757935e-115;
bool r35643436 = r35643429 <= r35643435;
double r35643437 = r35643429 / r35643432;
double r35643438 = 1.3508925074839404e-153;
bool r35643439 = r35643429 <= r35643438;
double r35643440 = 6.859366357865012e+120;
bool r35643441 = r35643429 <= r35643440;
double r35643442 = r35643427 / r35643432;
double r35643443 = r35643442 * r35643428;
double r35643444 = r35643441 ? r35643437 : r35643443;
double r35643445 = r35643439 ? r35643434 : r35643444;
double r35643446 = r35643436 ? r35643437 : r35643445;
double r35643447 = r35643431 ? r35643434 : r35643446;
return r35643447;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.2 |
|---|---|
| Target | 5.9 |
| Herbie | 1.1 |
if (* x y) < -1.7213465425126525e+172 or -3.4578769880757935e-115 < (* x y) < 1.3508925074839404e-153Initial program 10.2
rmApplied *-un-lft-identity10.2
Applied times-frac1.6
Simplified1.6
if -1.7213465425126525e+172 < (* x y) < -3.4578769880757935e-115 or 1.3508925074839404e-153 < (* x y) < 6.859366357865012e+120Initial program 0.2
rmApplied *-un-lft-identity0.2
Applied times-frac11.2
Simplified11.2
rmApplied associate-*r/0.2
if 6.859366357865012e+120 < (* x y) Initial program 15.6
rmApplied associate-/l*4.1
rmApplied associate-/r/3.1
Final simplification1.1
herbie shell --seed 2019163
(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))