\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -1.00913018527108544 \cdot 10^{193}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;x \cdot y \le -6.28788729122934697 \cdot 10^{-143}:\\
\;\;\;\;\left(x \cdot y\right) \cdot \frac{1}{z}\\
\mathbf{elif}\;x \cdot y \le 1.5244214612354576 \cdot 10^{-284}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;x \cdot y \le 9.81129541249854884 \cdot 10^{171}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}double f(double x, double y, double z) {
double r730873 = x;
double r730874 = y;
double r730875 = r730873 * r730874;
double r730876 = z;
double r730877 = r730875 / r730876;
return r730877;
}
double f(double x, double y, double z) {
double r730878 = x;
double r730879 = y;
double r730880 = r730878 * r730879;
double r730881 = -1.0091301852710854e+193;
bool r730882 = r730880 <= r730881;
double r730883 = z;
double r730884 = r730883 / r730879;
double r730885 = r730878 / r730884;
double r730886 = -6.287887291229347e-143;
bool r730887 = r730880 <= r730886;
double r730888 = 1.0;
double r730889 = r730888 / r730883;
double r730890 = r730880 * r730889;
double r730891 = 1.5244214612354576e-284;
bool r730892 = r730880 <= r730891;
double r730893 = r730878 / r730883;
double r730894 = r730879 * r730893;
double r730895 = 9.811295412498549e+171;
bool r730896 = r730880 <= r730895;
double r730897 = r730880 / r730883;
double r730898 = r730879 / r730883;
double r730899 = r730878 * r730898;
double r730900 = r730896 ? r730897 : r730899;
double r730901 = r730892 ? r730894 : r730900;
double r730902 = r730887 ? r730890 : r730901;
double r730903 = r730882 ? r730885 : r730902;
return r730903;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.3 |
|---|---|
| Target | 6.2 |
| Herbie | 0.7 |
if (* x y) < -1.0091301852710854e+193Initial program 24.7
rmApplied associate-/l*1.5
if -1.0091301852710854e+193 < (* x y) < -6.287887291229347e-143Initial program 0.3
rmApplied div-inv0.4
if -6.287887291229347e-143 < (* x y) < 1.5244214612354576e-284Initial program 11.1
rmApplied associate-/l*0.9
rmApplied clear-num1.4
rmApplied *-un-lft-identity1.4
Applied *-un-lft-identity1.4
Applied *-un-lft-identity1.4
Applied times-frac1.4
Applied times-frac1.4
Applied add-cube-cbrt1.4
Applied times-frac1.4
Simplified1.4
Simplified1.1
if 1.5244214612354576e-284 < (* x y) < 9.811295412498549e+171Initial program 0.2
if 9.811295412498549e+171 < (* x y) Initial program 22.4
rmApplied associate-/l*1.7
rmApplied *-un-lft-identity1.7
Applied *-un-lft-identity1.7
Applied times-frac1.7
Applied *-un-lft-identity1.7
Applied times-frac1.7
Simplified1.7
Simplified1.5
Final simplification0.7
herbie shell --seed 2020045 +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.7042130660650472e-164) (/ x (/ z y)) (* (/ x z) y)))
(/ (* x y) z))