\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;z \le -5.78095534954889683 \cdot 10^{-116} \lor \neg \left(z \le 7.1593596549390092 \cdot 10^{-78}\right):\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{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 (((z <= -5.780955349548897e-116) || !(z <= 7.159359654939009e-78))) {
temp = (x * ((y - z) / (t - z)));
} else {
temp = ((y - z) * (x / (t - z)));
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.9 |
|---|---|
| Target | 2.2 |
| Herbie | 2.3 |
if z < -5.780955349548897e-116 or 7.159359654939009e-78 < z Initial program 14.6
rmApplied *-un-lft-identity14.6
Applied times-frac0.5
Simplified0.5
if -5.780955349548897e-116 < z < 7.159359654939009e-78Initial program 6.0
rmApplied associate-/l*5.9
rmApplied div-sub5.9
rmApplied div-inv5.9
Applied div-inv5.9
Applied distribute-rgt-out--5.9
Applied *-un-lft-identity5.9
Applied times-frac6.1
Simplified6.1
Final simplification2.3
herbie shell --seed 2020060
(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)))