x \cdot \frac{\frac{y}{z} \cdot t}{t}\begin{array}{l}
\mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -2.07328337567161872 \cdot 10^{271}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -1.6856462603070247 \cdot 10^{-202}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 2.71166063239338584 \cdot 10^{-80}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\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) (((double) (((double) (y / z)) * t)) / t)) <= -2.0732833756716187e+271)) {
VAR = ((double) (((double) (x * y)) / z));
} else {
double VAR_1;
if ((((double) (((double) (((double) (y / z)) * t)) / t)) <= -1.6856462603070247e-202)) {
VAR_1 = ((double) (x * ((double) (y / z))));
} else {
double VAR_2;
if ((((double) (((double) (((double) (y / z)) * t)) / t)) <= 2.711660632393386e-80)) {
VAR_2 = ((double) (((double) (x * y)) / z));
} else {
VAR_2 = ((double) (x / ((double) (z / y))));
}
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.4 |
|---|---|
| Target | 1.6 |
| Herbie | 2.6 |
if (/ (* (/ y z) t) t) < -2.0732833756716187e+271 or -1.6856462603070247e-202 < (/ (* (/ y z) t) t) < 2.711660632393386e-80Initial program 23.4
Simplified9.6
rmApplied associate-*r/2.4
if -2.0732833756716187e+271 < (/ (* (/ y z) t) t) < -1.6856462603070247e-202Initial program 0.6
Simplified0.2
if 2.711660632393386e-80 < (/ (* (/ y z) t) t) Initial program 13.7
Simplified5.7
rmApplied associate-*r/9.3
rmApplied associate-/l*5.3
Final simplification2.6
herbie shell --seed 2020121
(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)))