\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y = -\infty:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;x \cdot y \le -2.666618308604909 \cdot 10^{-248}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;x \cdot y \le 1.291536027190061 \cdot 10^{-88}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;x \cdot y \le 2.0802670635728964 \cdot 10^{198}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\end{array}double f(double x, double y, double z) {
double r711977 = x;
double r711978 = y;
double r711979 = r711977 * r711978;
double r711980 = z;
double r711981 = r711979 / r711980;
return r711981;
}
double f(double x, double y, double z) {
double r711982 = x;
double r711983 = y;
double r711984 = r711982 * r711983;
double r711985 = -inf.0;
bool r711986 = r711984 <= r711985;
double r711987 = z;
double r711988 = r711987 / r711983;
double r711989 = r711982 / r711988;
double r711990 = -2.666618308604909e-248;
bool r711991 = r711984 <= r711990;
double r711992 = r711984 / r711987;
double r711993 = 1.291536027190061e-88;
bool r711994 = r711984 <= r711993;
double r711995 = r711983 / r711987;
double r711996 = r711982 * r711995;
double r711997 = 2.0802670635728964e+198;
bool r711998 = r711984 <= r711997;
double r711999 = r711982 / r711987;
double r712000 = r711999 * r711983;
double r712001 = r711998 ? r711992 : r712000;
double r712002 = r711994 ? r711996 : r712001;
double r712003 = r711991 ? r711992 : r712002;
double r712004 = r711986 ? r711989 : r712003;
return r712004;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.3 |
|---|---|
| Target | 6.0 |
| Herbie | 0.8 |
if (* x y) < -inf.0Initial program 64.0
rmApplied associate-/l*0.3
if -inf.0 < (* x y) < -2.666618308604909e-248 or 1.291536027190061e-88 < (* x y) < 2.0802670635728964e+198Initial program 0.2
if -2.666618308604909e-248 < (* x y) < 1.291536027190061e-88Initial program 8.6
rmApplied *-un-lft-identity8.6
Applied times-frac1.6
Simplified1.6
if 2.0802670635728964e+198 < (* x y) Initial program 28.2
rmApplied associate-/l*1.3
rmApplied associate-/r/1.2
Final simplification0.8
herbie shell --seed 2020036
(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.7042130660650472e-164) (/ x (/ z y)) (* (/ x z) y)))
(/ (* x y) z))