\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} = -inf.0 \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 4.7449220449497876 \cdot 10^{282}\right):\\
\;\;\;\;\frac{x}{\frac{t - z}{y - 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) (((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)))) <= -inf.0) || !(((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z)))) <= 4.744922044949788e+282))) {
VAR = ((double) (x / ((double) (((double) (t - z)) / ((double) (y - z))))));
} else {
VAR = ((double) (((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 | 11.6 |
|---|---|
| Target | 2.2 |
| Herbie | 1.2 |
if (/ (* x (- y z)) (- t z)) < -inf.0 or 4.744922044949788e+282 < (/ (* x (- y z)) (- t z)) Initial program 61.7
rmApplied associate-/l*0.6
if -inf.0 < (/ (* x (- y z)) (- t z)) < 4.744922044949788e+282Initial program 1.3
Final simplification1.2
herbie shell --seed 2020140
(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)))