\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -2.7695334225662796 \cdot 10^{-244}:\\
\;\;\;\;\frac{1}{\frac{z}{x \cdot y}}\\
\mathbf{elif}\;x \cdot y \le 1.8204694772158963 \cdot 10^{-280}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{elif}\;x \cdot y \le 1.0368740468265092 \cdot 10^{+191}:\\
\;\;\;\;\frac{1}{\frac{z}{x \cdot y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}double f(double x, double y, double z) {
double r12590448 = x;
double r12590449 = y;
double r12590450 = r12590448 * r12590449;
double r12590451 = z;
double r12590452 = r12590450 / r12590451;
return r12590452;
}
double f(double x, double y, double z) {
double r12590453 = x;
double r12590454 = y;
double r12590455 = r12590453 * r12590454;
double r12590456 = -2.7695334225662796e-244;
bool r12590457 = r12590455 <= r12590456;
double r12590458 = 1.0;
double r12590459 = z;
double r12590460 = r12590459 / r12590455;
double r12590461 = r12590458 / r12590460;
double r12590462 = 1.8204694772158963e-280;
bool r12590463 = r12590455 <= r12590462;
double r12590464 = r12590454 / r12590459;
double r12590465 = r12590464 * r12590453;
double r12590466 = 1.0368740468265092e+191;
bool r12590467 = r12590455 <= r12590466;
double r12590468 = r12590459 / r12590454;
double r12590469 = r12590453 / r12590468;
double r12590470 = r12590467 ? r12590461 : r12590469;
double r12590471 = r12590463 ? r12590465 : r12590470;
double r12590472 = r12590457 ? r12590461 : r12590471;
return r12590472;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 5.8 |
|---|---|
| Target | 6.0 |
| Herbie | 1.9 |
if (* x y) < -2.7695334225662796e-244 or 1.8204694772158963e-280 < (* x y) < 1.0368740468265092e+191Initial program 2.0
rmApplied clear-num2.4
if -2.7695334225662796e-244 < (* x y) < 1.8204694772158963e-280Initial program 14.4
rmApplied *-un-lft-identity14.4
Applied times-frac0.1
Simplified0.1
if 1.0368740468265092e+191 < (* x y) Initial program 23.0
rmApplied associate-/l*1.2
Final simplification1.9
herbie shell --seed 2019156
(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))