\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot y}{z} \le -4.08755864732723577 \cdot 10^{306}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;\frac{x \cdot y}{z} \le -9.88131 \cdot 10^{-324}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x \cdot \left|\frac{\sqrt[3]{y}}{\sqrt[3]{z}}\right|\right) \cdot \sqrt{\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{z} \cdot \sqrt[3]{z}}}\right) \cdot \frac{\sqrt[3]{y}}{\sqrt[3]{z}}\\
\end{array}double code(double x, double y, double z) {
return (((double) (x * y)) / z);
}
double code(double x, double y, double z) {
double VAR;
if (((((double) (x * y)) / z) <= -4.087558647327236e+306)) {
VAR = (x / (z / y));
} else {
double VAR_1;
if (((((double) (x * y)) / z) <= -9.8813129168249e-324)) {
VAR_1 = (((double) (x * y)) / z);
} else {
VAR_1 = ((double) (((double) (((double) (x * ((double) fabs((((double) cbrt(y)) / ((double) cbrt(z))))))) * ((double) sqrt((((double) (((double) cbrt(y)) * ((double) cbrt(y)))) / ((double) (((double) cbrt(z)) * ((double) cbrt(z))))))))) * (((double) cbrt(y)) / ((double) cbrt(z)))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.5 |
|---|---|
| Target | 6.3 |
| Herbie | 1.3 |
if (/ (* x y) z) < -4.08755864732723577e306Initial program 62.1
rmApplied associate-/l*0.6
if -4.08755864732723577e306 < (/ (* x y) z) < -9.88131e-324Initial program 0.6
if -9.88131e-324 < (/ (* x y) z) Initial program 7.8
rmApplied *-un-lft-identity7.8
Applied times-frac4.9
Simplified4.9
rmApplied add-cube-cbrt5.7
Applied add-cube-cbrt5.8
Applied times-frac5.8
Applied associate-*r*1.7
rmApplied add-sqr-sqrt1.7
Applied associate-*r*1.7
Simplified1.7
Final simplification1.3
herbie shell --seed 2020181
(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))