x \cdot \frac{\frac{y}{z} \cdot t}{t}\begin{array}{l}
\mathbf{if}\;\frac{y}{z} \le -3.72571023764110904 \cdot 10^{244}:\\
\;\;\;\;\left(x \cdot y\right) \cdot \frac{1}{z}\\
\mathbf{elif}\;\frac{y}{z} \le -8.987899822231578 \cdot 10^{-229}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;\frac{y}{z} \le 1.32787603481453967 \cdot 10^{-299}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;\frac{y}{z} \le 5.1939546629028175 \cdot 10^{163}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{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)) <= -3.725710237641109e+244)) {
VAR = ((double) (((double) (x * y)) * ((double) (1.0 / z))));
} else {
double VAR_1;
if ((((double) (y / z)) <= -8.987899822231578e-229)) {
VAR_1 = ((double) (x * ((double) (y / z))));
} else {
double VAR_2;
if ((((double) (y / z)) <= 1.3278760348145397e-299)) {
VAR_2 = ((double) (((double) (x * y)) / z));
} else {
double VAR_3;
if ((((double) (y / z)) <= 5.1939546629028175e+163)) {
VAR_3 = ((double) (x * ((double) (y / z))));
} else {
VAR_3 = ((double) (((double) (x * y)) / z));
}
VAR_2 = VAR_3;
}
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 | 14.7 |
|---|---|
| Target | 1.6 |
| Herbie | 0.4 |
if (/ y z) < -3.72571023764110904e244Initial program 51.5
Simplified38.9
rmApplied div-inv39.0
Applied associate-*r*0.6
if -3.72571023764110904e244 < (/ y z) < -8.987899822231578e-229 or 1.32787603481453967e-299 < (/ y z) < 5.1939546629028175e163Initial program 9.1
Simplified0.2
if -8.987899822231578e-229 < (/ y z) < 1.32787603481453967e-299 or 5.1939546629028175e163 < (/ y z) Initial program 22.5
Simplified14.7
rmApplied associate-*r/0.9
Final simplification0.4
herbie shell --seed 2020164
(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)))