x \cdot \frac{\frac{y}{z} \cdot t}{t}\begin{array}{l}
\mathbf{if}\;\frac{y}{z} \le -1.226279784595816 \cdot 10^{271}:\\
\;\;\;\;\frac{x \cdot \left(-y\right)}{-z}\\
\mathbf{elif}\;\frac{y}{z} \le -1.0435942227704809 \cdot 10^{-301}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;\frac{y}{z} \le 2.40252814846900272 \cdot 10^{-189}:\\
\;\;\;\;\frac{x \cdot \left(-y\right)}{-z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \frac{y}{\sqrt[3]{z}}}{\frac{\sqrt[3]{z} \cdot \sqrt[3]{z}}{\sqrt[3]{x}}}\\
\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)) <= -1.226279784595816e+271)) {
VAR = ((double) (((double) (x * ((double) -(y)))) / ((double) -(z))));
} else {
double VAR_1;
if ((((double) (y / z)) <= -1.0435942227704809e-301)) {
VAR_1 = ((double) (x * ((double) (y / z))));
} else {
double VAR_2;
if ((((double) (y / z)) <= 2.4025281484690027e-189)) {
VAR_2 = ((double) (((double) (x * ((double) -(y)))) / ((double) -(z))));
} else {
VAR_2 = ((double) (((double) (((double) (((double) cbrt(x)) * ((double) cbrt(x)))) * ((double) (y / ((double) cbrt(z)))))) / ((double) (((double) (((double) cbrt(z)) * ((double) cbrt(z)))) / ((double) cbrt(x))))));
}
VAR_1 = VAR_2;
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 13.9 |
|---|---|
| Target | 1.4 |
| Herbie | 1.6 |
if (/ y z) < -1.226279784595816e+271 or -1.0435942227704809e-301 < (/ y z) < 2.4025281484690027e-189Initial program 21.9
Simplified16.4
rmApplied frac-2neg16.4
Applied associate-*r/0.3
if -1.226279784595816e+271 < (/ y z) < -1.0435942227704809e-301Initial program 9.3
Simplified0.2
if 2.4025281484690027e-189 < (/ y z) Initial program 13.0
Simplified4.8
rmApplied add-cube-cbrt5.8
Applied *-un-lft-identity5.8
Applied times-frac5.8
Applied associate-*r*6.9
Simplified6.9
rmApplied add-cube-cbrt7.1
Applied associate-/l*7.1
Applied associate-*l/4.0
Final simplification1.6
herbie shell --seed 2020113 +o rules:numerics
(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)))