\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} \le -4.0798383452349713 \cdot 10^{97} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le -3.21143 \cdot 10^{-322}\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 ((x * (y - z)) / (t - z));
}
double code(double x, double y, double z, double t) {
double VAR;
if (((((x * (y - z)) / (t - z)) <= -4.079838345234971e+97) || !(((x * (y - z)) / (t - z)) <= -3.2114266979681e-322))) {
VAR = (x / ((t - z) / (y - z)));
} else {
VAR = ((x * (y - z)) / (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.3 |
| Herbie | 1.7 |
if (/ (* x (- y z)) (- t z)) < -4.079838345234971e+97 or -3.2114266979681e-322 < (/ (* x (- y z)) (- t z)) Initial program 16.4
rmApplied associate-/l*2.3
if -4.079838345234971e+97 < (/ (* x (- y z)) (- t z)) < -3.2114266979681e-322Initial program 0.3
Final simplification1.7
herbie shell --seed 2020103 +o rules:numerics
(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)))