\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} \le -0.0:\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\
\mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{t - z} \le 3.51564936160555812 \cdot 10^{289}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t - z} \cdot \left(y - z\right)\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z))));
}
double code(double x, double y, double z, double t) {
double VAR;
if ((((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z)))) <= -0.0)) {
VAR = ((double) (x * ((double) (((double) (y - z)) / ((double) (t - z))))));
} else {
double VAR_1;
if ((((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z)))) <= 3.515649361605558e+289)) {
VAR_1 = ((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z))));
} else {
VAR_1 = ((double) (((double) (x / ((double) (t - z)))) * ((double) (y - z))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 10.9 |
|---|---|
| Target | 2.2 |
| Herbie | 1.4 |
if (/ (* x (- y z)) (- t z)) < -0.0Initial program 10.7
rmApplied *-un-lft-identity10.7
Applied times-frac2.0
Simplified2.0
if -0.0 < (/ (* x (- y z)) (- t z)) < 3.51564936160555812e289Initial program 0.3
if 3.51564936160555812e289 < (/ (* x (- y z)) (- t z)) Initial program 60.3
rmApplied associate-/l*0.6
rmApplied associate-/r/1.7
Final simplification1.4
herbie shell --seed 2020161
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:herbie-target
(/ x (/ (- t z) (- y z)))
(/ (* x (- y z)) (- t z)))