\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -7.4631714988571799 \cdot 10^{-140} \lor \neg \left(x \cdot y \le -0.0\right):\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}double f(double x, double y, double z) {
double r712841 = x;
double r712842 = y;
double r712843 = r712841 * r712842;
double r712844 = z;
double r712845 = r712843 / r712844;
return r712845;
}
double f(double x, double y, double z) {
double r712846 = x;
double r712847 = y;
double r712848 = r712846 * r712847;
double r712849 = -7.46317149885718e-140;
bool r712850 = r712848 <= r712849;
double r712851 = -0.0;
bool r712852 = r712848 <= r712851;
double r712853 = !r712852;
bool r712854 = r712850 || r712853;
double r712855 = z;
double r712856 = r712848 / r712855;
double r712857 = r712855 / r712847;
double r712858 = r712846 / r712857;
double r712859 = r712854 ? r712856 : r712858;
return r712859;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.5 |
|---|---|
| Target | 6.4 |
| Herbie | 3.9 |
if (* x y) < -7.46317149885718e-140 or -0.0 < (* x y) Initial program 4.8
if -7.46317149885718e-140 < (* x y) < -0.0Initial program 11.5
rmApplied associate-/l*1.1
Final simplification3.9
herbie shell --seed 2020081
(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))