x \cdot \frac{\frac{y}{z} \cdot t}{t}\begin{array}{l}
\mathbf{if}\;\frac{y}{z} = -inf.0:\\
\;\;\;\;\left(x \cdot y\right) \cdot \frac{1}{z}\\
\mathbf{elif}\;\frac{y}{z} \le -1.35503121888688526 \cdot 10^{-273}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{z}} \cdot \left(\frac{\sqrt[3]{x}}{\sqrt[3]{z}} \cdot \frac{y}{\sqrt[3]{z}}\right)\\
\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)) <= -inf.0)) {
VAR = ((double) (((double) (x * y)) * ((double) (1.0 / z))));
} else {
double VAR_1;
if ((((double) (y / z)) <= -1.3550312188868853e-273)) {
VAR_1 = ((double) (x * ((double) (y / z))));
} else {
VAR_1 = ((double) (((double) (((double) (((double) cbrt(x)) * ((double) cbrt(x)))) / ((double) cbrt(z)))) * ((double) (((double) (((double) cbrt(x)) / ((double) cbrt(z)))) * ((double) (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.9 |
|---|---|
| Target | 1.5 |
| Herbie | 1.8 |
if (/ y z) < -inf.0Initial program 64.0
Simplified64.0
rmApplied div-inv64.0
Applied associate-*r*0.4
if -inf.0 < (/ y z) < -1.3550312188868853e-273Initial program 10.3
Simplified0.2
if -1.3550312188868853e-273 < (/ y z) Initial program 15.6
Simplified8.1
rmApplied add-cube-cbrt8.7
Applied *-un-lft-identity8.7
Applied times-frac8.7
Applied associate-*r*5.3
Simplified5.3
rmApplied add-cube-cbrt5.5
Applied times-frac5.5
Applied associate-*l*2.9
Final simplification1.8
herbie shell --seed 2020129
(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)))