x \cdot \frac{\frac{y}{z} \cdot t}{t}\begin{array}{l}
\mathbf{if}\;\frac{y}{z} \le -2.420108580537642 \cdot 10^{257}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;\frac{y}{z} \le -4.0053845016109819 \cdot 10^{-283}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{z} \cdot \sqrt[3]{z}}\right) \cdot \frac{\sqrt[3]{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \sqrt[3]{\sqrt[3]{y}}}{\sqrt[3]{z}}\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) (x * ((double) (((double) (((double) (y / z)) * t)) / t))));
}
double code(double x, double y, double z, double t) {
double VAR;
if ((((double) (y / z)) <= -2.4201085805376417e+257)) {
VAR = ((double) (((double) (x * y)) / z));
} else {
double VAR_1;
if ((((double) (y / z)) <= -4.005384501610982e-283)) {
VAR_1 = ((double) (x * ((double) (y / z))));
} else {
VAR_1 = ((double) (((double) (x * ((double) (((double) (((double) cbrt(y)) * ((double) cbrt(y)))) / ((double) (((double) cbrt(z)) * ((double) cbrt(z)))))))) * ((double) (((double) (((double) cbrt(((double) (((double) cbrt(y)) * ((double) cbrt(y)))))) * ((double) cbrt(((double) cbrt(y)))))) / ((double) cbrt(z))))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 14.4 |
|---|---|
| Target | 1.7 |
| Herbie | 1.5 |
if (/ y z) < -2.420108580537642e257Initial program 51.7
Simplified41.2
rmApplied associate-*r/0.4
if -2.420108580537642e257 < (/ y z) < -4.0053845016109819e-283Initial program 9.2
Simplified0.2
if -4.0053845016109819e-283 < (/ y z) Initial program 15.4
Simplified8.0
rmApplied add-cube-cbrt8.7
Applied add-cube-cbrt8.9
Applied times-frac8.9
Applied associate-*r*2.3
rmApplied add-cube-cbrt2.3
Applied cbrt-prod2.3
Final simplification1.5
herbie shell --seed 2020162
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1, B"
:precision binary64
:herbie-target
(if (< (/ (* (/ y z) t) t) -1.20672205123045e+245) (/ y (/ z x)) (if (< (/ (* (/ y z) t) t) -5.907522236933906e-275) (* x (/ y z)) (if (< (/ (* (/ y z) t) t) 5.658954423153415e-65) (/ y (/ z x)) (if (< (/ (* (/ y z) t) t) 2.0087180502407133e+217) (* x (/ y z)) (/ (* y x) z)))))
(* x (/ (* (/ y z) t) t)))