\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -1.04346702924937464405655528797078472535 \cdot 10^{184}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;x \cdot y \le -6.767888822225492857201731483039858827192 \cdot 10^{-97}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;x \cdot y \le 0.0:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{elif}\;x \cdot y \le 3.151161814343171226593651794549303754932 \cdot 10^{282}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\end{array}double f(double x, double y, double z) {
double r31253030 = x;
double r31253031 = y;
double r31253032 = r31253030 * r31253031;
double r31253033 = z;
double r31253034 = r31253032 / r31253033;
return r31253034;
}
double f(double x, double y, double z) {
double r31253035 = x;
double r31253036 = y;
double r31253037 = r31253035 * r31253036;
double r31253038 = -1.0434670292493746e+184;
bool r31253039 = r31253037 <= r31253038;
double r31253040 = z;
double r31253041 = r31253040 / r31253036;
double r31253042 = r31253035 / r31253041;
double r31253043 = -6.767888822225493e-97;
bool r31253044 = r31253037 <= r31253043;
double r31253045 = r31253037 / r31253040;
double r31253046 = 0.0;
bool r31253047 = r31253037 <= r31253046;
double r31253048 = r31253036 / r31253040;
double r31253049 = r31253048 * r31253035;
double r31253050 = 3.151161814343171e+282;
bool r31253051 = r31253037 <= r31253050;
double r31253052 = r31253035 / r31253040;
double r31253053 = r31253052 * r31253036;
double r31253054 = r31253051 ? r31253045 : r31253053;
double r31253055 = r31253047 ? r31253049 : r31253054;
double r31253056 = r31253044 ? r31253045 : r31253055;
double r31253057 = r31253039 ? r31253042 : r31253056;
return r31253057;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.2 |
|---|---|
| Target | 6.1 |
| Herbie | 0.8 |
if (* x y) < -1.0434670292493746e+184Initial program 22.1
rmApplied associate-/l*1.7
if -1.0434670292493746e+184 < (* x y) < -6.767888822225493e-97 or 0.0 < (* x y) < 3.151161814343171e+282Initial program 0.3
rmApplied associate-/l*9.0
rmApplied *-un-lft-identity9.0
Applied add-cube-cbrt9.8
Applied times-frac9.8
Applied add-cube-cbrt10.1
Applied times-frac4.3
Simplified4.3
Taylor expanded around 0 0.3
if -6.767888822225493e-97 < (* x y) < 0.0Initial program 9.8
rmApplied *-un-lft-identity9.8
Applied times-frac1.6
Simplified1.6
if 3.151161814343171e+282 < (* x y) Initial program 51.0
rmApplied associate-/l*0.2
rmApplied associate-/r/0.2
Final simplification0.8
herbie shell --seed 2019170 +o rules:numerics
(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))