\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 -1.518340285158244167699972310716084602895 \cdot 10^{-194} \lor \neg \left(x \cdot y \le 5.88065538335666025342643040475244053333 \cdot 10^{-283}\right) \land x \cdot y \le 1.984690863720470523745396250756862977108 \cdot 10^{170}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}double f(double x, double y, double z) {
double r594765 = x;
double r594766 = y;
double r594767 = r594765 * r594766;
double r594768 = z;
double r594769 = r594767 / r594768;
return r594769;
}
double f(double x, double y, double z) {
double r594770 = x;
double r594771 = y;
double r594772 = r594770 * r594771;
double r594773 = -inf.0;
bool r594774 = r594772 <= r594773;
double r594775 = z;
double r594776 = r594771 / r594775;
double r594777 = r594770 * r594776;
double r594778 = -1.5183402851582442e-194;
bool r594779 = r594772 <= r594778;
double r594780 = 5.88065538335666e-283;
bool r594781 = r594772 <= r594780;
double r594782 = !r594781;
double r594783 = 1.9846908637204705e+170;
bool r594784 = r594772 <= r594783;
bool r594785 = r594782 && r594784;
bool r594786 = r594779 || r594785;
double r594787 = r594772 / r594775;
double r594788 = r594775 / r594771;
double r594789 = r594770 / r594788;
double r594790 = r594786 ? r594787 : r594789;
double r594791 = r594774 ? r594777 : r594790;
return r594791;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.1 |
|---|---|
| Target | 6.1 |
| Herbie | 0.4 |
if (* x y) < -inf.0Initial program 64.0
rmApplied *-un-lft-identity64.0
Applied times-frac0.2
Simplified0.2
if -inf.0 < (* x y) < -1.5183402851582442e-194 or 5.88065538335666e-283 < (* x y) < 1.9846908637204705e+170Initial program 0.2
if -1.5183402851582442e-194 < (* x y) < 5.88065538335666e-283 or 1.9846908637204705e+170 < (* x y) Initial program 14.3
rmApplied associate-/l*0.7
Final simplification0.4
herbie shell --seed 2019305
(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))