\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;z \le -2.37659876275777375 \cdot 10^{-131} \lor \neg \left(z \le 2.66649033172118856 \cdot 10^{-202}\right):\\
\;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t - z} \cdot \left(y - z\right)\\
\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 (((z <= -2.3765987627577737e-131) || !(z <= 2.6664903317211886e-202))) {
VAR = (x / ((t - z) / (y - z)));
} else {
VAR = ((x / (t - z)) * (y - 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 | 2.3 |
if z < -2.3765987627577737e-131 or 2.6664903317211886e-202 < z Initial program 13.0
rmApplied associate-/l*1.2
if -2.3765987627577737e-131 < z < 2.6664903317211886e-202Initial program 6.0
rmApplied associate-/l*6.1
rmApplied associate-/r/6.2
Final simplification2.3
herbie shell --seed 2020075
(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)))