\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} \le -1.2281290268927713 \cdot 10^{250} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 2.97242941231804261 \cdot 10^{302}\right):\\
\;\;\;\;\frac{x}{\frac{t}{y - z} - \frac{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 temp;
if (((((x * (y - z)) / (t - z)) <= -1.2281290268927713e+250) || !(((x * (y - z)) / (t - z)) <= 2.9724294123180426e+302))) {
temp = (x / ((t / (y - z)) - (z / (y - z))));
} else {
temp = ((x * (y - z)) / (t - z));
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.8 |
|---|---|
| Target | 2.5 |
| Herbie | 1.3 |
if (/ (* x (- y z)) (- t z)) < -1.2281290268927713e+250 or 2.9724294123180426e+302 < (/ (* x (- y z)) (- t z)) Initial program 59.6
rmApplied associate-/l*0.7
rmApplied div-sub0.7
if -1.2281290268927713e+250 < (/ (* x (- y z)) (- t z)) < 2.9724294123180426e+302Initial program 1.4
Final simplification1.3
herbie shell --seed 2020058
(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)))