\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} \leq 6.321152404090463 \cdot 10^{-118} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \leq 1.3382242743790237 \cdot 10^{+306}\right):\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\
\end{array}double code(double x, double y, double z, double t) {
return (((double) (x * ((double) (y - z)))) / ((double) (t - z)));
}
double code(double x, double y, double z, double t) {
double VAR;
if ((((((double) (x * ((double) (y - z)))) / ((double) (t - z))) <= 6.321152404090463e-118) || !((((double) (x * ((double) (y - z)))) / ((double) (t - z))) <= 1.3382242743790237e+306))) {
VAR = ((double) (x * (((double) (y - z)) / ((double) (t - z)))));
} else {
VAR = (((double) (x * ((double) (y - z)))) / ((double) (t - z)));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 12.1 |
|---|---|
| Target | 2.3 |
| Herbie | 1.7 |
if (/ (* x (- y z)) (- t z)) < 6.3211524040904627e-118 or 1.3382242743790237e306 < (/ (* x (- y z)) (- t z)) Initial program Error: 15.9 bits
SimplifiedError: 2.1 bits
if 6.3211524040904627e-118 < (/ (* x (- y z)) (- t z)) < 1.3382242743790237e306Initial program Error: 0.2 bits
Final simplificationError: 1.7 bits
herbie shell --seed 2020200
(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)))