\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -1.827618842210325856116378407212167275336 \cdot 10^{252}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\mathbf{elif}\;x \cdot y \le -1.416922114786241732626195364860208906831 \cdot 10^{-291}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;x \cdot y \le 1.654394754607905895780595947422963951718 \cdot 10^{-114}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;x \cdot y \le 1.866392507649868309583567517907241893789 \cdot 10^{207}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}double f(double x, double y, double z) {
double r195701973 = x;
double r195701974 = y;
double r195701975 = r195701973 * r195701974;
double r195701976 = z;
double r195701977 = r195701975 / r195701976;
return r195701977;
}
double f(double x, double y, double z) {
double r195701978 = x;
double r195701979 = y;
double r195701980 = r195701978 * r195701979;
double r195701981 = -1.8276188422103259e+252;
bool r195701982 = r195701980 <= r195701981;
double r195701983 = z;
double r195701984 = r195701978 / r195701983;
double r195701985 = r195701984 * r195701979;
double r195701986 = -1.4169221147862417e-291;
bool r195701987 = r195701980 <= r195701986;
double r195701988 = r195701980 / r195701983;
double r195701989 = 1.654394754607906e-114;
bool r195701990 = r195701980 <= r195701989;
double r195701991 = r195701983 / r195701979;
double r195701992 = r195701978 / r195701991;
double r195701993 = 1.8663925076498683e+207;
bool r195701994 = r195701980 <= r195701993;
double r195701995 = r195701994 ? r195701988 : r195701992;
double r195701996 = r195701990 ? r195701992 : r195701995;
double r195701997 = r195701987 ? r195701988 : r195701996;
double r195701998 = r195701982 ? r195701985 : r195701997;
return r195701998;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.5 |
|---|---|
| Target | 6.3 |
| Herbie | 0.6 |
if (* x y) < -1.8276188422103259e+252Initial program 40.2
rmApplied associate-/l*0.3
rmApplied associate-/r/0.2
if -1.8276188422103259e+252 < (* x y) < -1.4169221147862417e-291 or 1.654394754607906e-114 < (* x y) < 1.8663925076498683e+207Initial program 0.2
if -1.4169221147862417e-291 < (* x y) < 1.654394754607906e-114 or 1.8663925076498683e+207 < (* x y) Initial program 13.9
rmApplied associate-/l*1.2
Final simplification0.6
herbie shell --seed 2019173
(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))