\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;z \le -4.84441128580285646 \cdot 10^{-157}:\\
\;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\
\mathbf{elif}\;z \le 1.16237514923294402 \cdot 10^{-156}:\\
\;\;\;\;\frac{x}{t - z} \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y - z}{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 ((z <= -4.8444112858028565e-157)) {
VAR = (x / ((t - z) / (y - z)));
} else {
double VAR_1;
if ((z <= 1.162375149232944e-156)) {
VAR_1 = ((x / (t - z)) * (y - z));
} else {
VAR_1 = (x * ((y - z) / (t - z)));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.7 |
|---|---|
| Target | 2.1 |
| Herbie | 2.2 |
if z < -4.8444112858028565e-157Initial program 13.2
rmApplied associate-/l*1.1
if -4.8444112858028565e-157 < z < 1.162375149232944e-156Initial program 5.9
rmApplied associate-/l*5.4
rmApplied associate-/r/6.0
if 1.162375149232944e-156 < z Initial program 13.7
rmApplied *-un-lft-identity13.7
Applied times-frac1.0
Simplified1.0
Final simplification2.2
herbie shell --seed 2020106
(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)))