\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y = -\infty:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;x \cdot y \le -3.303760412052484390435489424481917742401 \cdot 10^{-243} \lor \neg \left(x \cdot y \le 6.866383191027284350312248499135040834178 \cdot 10^{-240}\right) \land x \cdot y \le 8.123647290761479259839095592609619592255 \cdot 10^{143}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}double f(double x, double y, double z) {
double r500063 = x;
double r500064 = y;
double r500065 = r500063 * r500064;
double r500066 = z;
double r500067 = r500065 / r500066;
return r500067;
}
double f(double x, double y, double z) {
double r500068 = x;
double r500069 = y;
double r500070 = r500068 * r500069;
double r500071 = -inf.0;
bool r500072 = r500070 <= r500071;
double r500073 = z;
double r500074 = r500069 / r500073;
double r500075 = r500068 * r500074;
double r500076 = -3.3037604120524844e-243;
bool r500077 = r500070 <= r500076;
double r500078 = 6.866383191027284e-240;
bool r500079 = r500070 <= r500078;
double r500080 = !r500079;
double r500081 = 8.12364729076148e+143;
bool r500082 = r500070 <= r500081;
bool r500083 = r500080 && r500082;
bool r500084 = r500077 || r500083;
double r500085 = r500070 / r500073;
double r500086 = r500073 / r500069;
double r500087 = r500068 / r500086;
double r500088 = r500084 ? r500085 : r500087;
double r500089 = r500072 ? r500075 : r500088;
return r500089;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.0 |
|---|---|
| Target | 6.0 |
| Herbie | 0.5 |
if (* x y) < -inf.0Initial program 64.0
rmApplied *-un-lft-identity64.0
Applied times-frac0.2
Simplified0.2
if -inf.0 < (* x y) < -3.3037604120524844e-243 or 6.866383191027284e-240 < (* x y) < 8.12364729076148e+143Initial program 0.2
if -3.3037604120524844e-243 < (* x y) < 6.866383191027284e-240 or 8.12364729076148e+143 < (* x y) Initial program 13.8
rmApplied associate-/l*0.9
Final simplification0.5
herbie shell --seed 2019209 +o rules:numerics
(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.70421306606504721e-164) (/ x (/ z y)) (* (/ x z) y)))
(/ (* x y) z))