x \cdot \frac{\frac{y}{z} \cdot t}{t}\begin{array}{l}
\mathbf{if}\;\frac{y}{z} \le -4.969910642538988 \cdot 10^{157}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;\frac{y}{z} \le -4.3892669407339987 \cdot 10^{-84}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;\frac{y}{z} \le 1.0868597561693863 \cdot 10^{-196}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{y}{\sqrt[3]{z}}\\
\end{array}double code(double x, double y, double z, double t) {
return (x * (((y / z) * t) / t));
}
double code(double x, double y, double z, double t) {
double temp;
if (((y / z) <= -4.969910642538988e+157)) {
temp = ((x * y) / z);
} else {
double temp_1;
if (((y / z) <= -4.389266940733999e-84)) {
temp_1 = (x * (y / z));
} else {
double temp_2;
if (((y / z) <= 1.0868597561693863e-196)) {
temp_2 = ((x * y) / z);
} else {
temp_2 = ((x / (cbrt(z) * cbrt(z))) * (y / cbrt(z)));
}
temp_1 = temp_2;
}
temp = temp_1;
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 14.7 |
|---|---|
| Target | 1.4 |
| Herbie | 3.3 |
if (/ y z) < -4.969910642538988e+157 or -4.389266940733999e-84 < (/ y z) < 1.0868597561693863e-196Initial program 18.9
Simplified9.8
rmApplied associate-*r/2.0
if -4.969910642538988e+157 < (/ y z) < -4.389266940733999e-84Initial program 5.3
Simplified0.2
if 1.0868597561693863e-196 < (/ y z) Initial program 14.2
Simplified5.1
rmApplied add-cube-cbrt6.0
Applied *-un-lft-identity6.0
Applied times-frac6.1
Applied associate-*r*6.5
Simplified6.5
Final simplification3.3
herbie shell --seed 2020053
(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)))