\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 1.44466708885499135 \cdot 10^{284}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\
\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)))) <= 1.4446670888549914e+284)) {
VAR_1 = ((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z))));
} else {
VAR_1 = ((double) (x / ((double) (((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 | 11.7 |
|---|---|
| Target | 2.1 |
| Herbie | 1.3 |
if (/ (* x (- y z)) (- t z)) < -0.0Initial program 11.6
rmApplied *-un-lft-identity11.6
Applied times-frac2.1
Simplified2.1
if -0.0 < (/ (* x (- y z)) (- t z)) < 1.44466708885499135e284Initial program 0.4
if 1.44466708885499135e284 < (/ (* x (- y z)) (- t z)) Initial program 60.6
rmApplied associate-/l*0.5
Final simplification1.3
herbie shell --seed 2020163
(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)))