\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;z \le -9.4761928936906738 \cdot 10^{-199} \lor \neg \left(z \le 2.3289974463294087 \cdot 10^{-48}\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 ((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z))));
}
double code(double x, double y, double z, double t) {
double VAR;
if (((z <= -9.476192893690674e-199) || !(z <= 2.3289974463294087e-48))) {
VAR = ((double) (x / ((double) (((double) (t / ((double) (y - z)))) - ((double) (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 | 12.0 |
|---|---|
| Target | 2.2 |
| Herbie | 2.3 |
if z < -9.4761928936906738e-199 or 2.3289974463294087e-48 < z Initial program 14.4
Simplified0.9
rmApplied clear-num1.0
rmApplied un-div-inv0.8
rmApplied div-sub0.8
if -9.4761928936906738e-199 < z < 2.3289974463294087e-48Initial program 6.1
Final simplification2.3
herbie shell --seed 2020184
(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)))