\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5.0861216218609165 \cdot 10^{+116}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;x \cdot y \leq -3.9699086841145227 \cdot 10^{-296}:\\
\;\;\;\;\left(x \cdot y\right) \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{\sqrt[3]{z} \cdot \sqrt[3]{z}}\right)\right) \cdot \frac{\sqrt[3]{\sqrt[3]{y}} \cdot \left(\sqrt[3]{\sqrt[3]{y}} \cdot \sqrt[3]{\sqrt[3]{y}}\right)}{\sqrt[3]{z}}\\
\end{array}(FPCore (x y z) :precision binary64 (/ (* x y) z))
(FPCore (x y z)
:precision binary64
(if (<= (* x y) -5.0861216218609165e+116)
(* x (/ y z))
(if (<= (* x y) -3.9699086841145227e-296)
(* (* x y) (/ 1.0 z))
(*
(* x (* (cbrt y) (/ (cbrt y) (* (cbrt z) (cbrt z)))))
(/ (* (cbrt (cbrt y)) (* (cbrt (cbrt y)) (cbrt (cbrt y)))) (cbrt z))))))double code(double x, double y, double z) {
return (((double) (x * y)) / z);
}
double code(double x, double y, double z) {
double tmp;
if ((((double) (x * y)) <= -5.0861216218609165e+116)) {
tmp = ((double) (x * (y / z)));
} else {
double tmp_1;
if ((((double) (x * y)) <= -3.9699086841145227e-296)) {
tmp_1 = ((double) (((double) (x * y)) * (1.0 / z)));
} else {
tmp_1 = ((double) (((double) (x * ((double) (((double) cbrt(y)) * (((double) cbrt(y)) / ((double) (((double) cbrt(z)) * ((double) cbrt(z))))))))) * (((double) (((double) cbrt(((double) cbrt(y)))) * ((double) (((double) cbrt(((double) cbrt(y)))) * ((double) cbrt(((double) cbrt(y)))))))) / ((double) cbrt(z)))));
}
tmp = tmp_1;
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 5.8 |
|---|---|
| Target | 6.1 |
| Herbie | 1.5 |
if (* x y) < -5.0861216218609165e116Initial program Error: 15.6 bits
SimplifiedError: 3.1 bits
if -5.0861216218609165e116 < (* x y) < -3.96990868411452272e-296Initial program Error: 0.2 bits
SimplifiedError: 8.9 bits
rmApplied div-invError: 9.0 bits
Applied associate-*r*Error: 0.3 bits
if -3.96990868411452272e-296 < (* x y) Initial program Error: 7.1 bits
SimplifiedError: 5.6 bits
rmApplied add-cube-cbrtError: 6.3 bits
Applied add-cube-cbrtError: 6.5 bits
Applied times-fracError: 6.5 bits
Applied associate-*r*Error: 1.7 bits
SimplifiedError: 1.7 bits
rmApplied add-cube-cbrtError: 1.9 bits
Final simplificationError: 1.5 bits
herbie shell --seed 2020203
(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))