\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} \le -4.0798383452349713 \cdot 10^{97}:\\
\;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\
\mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{t - z} \le -3.21143 \cdot 10^{-322}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{t - z} - \frac{z}{t - 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 ((((x * (y - z)) / (t - z)) <= -4.079838345234971e+97)) {
VAR = (x / ((t - z) / (y - z)));
} else {
double VAR_1;
if ((((x * (y - z)) / (t - z)) <= -3.2114266979681e-322)) {
VAR_1 = ((x * (y - z)) / (t - z));
} else {
VAR_1 = (x * ((y / (t - z)) - (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.6 |
|---|---|
| Target | 2.3 |
| Herbie | 1.7 |
if (/ (* x (- y z)) (- t z)) < -4.079838345234971e+97Initial program 32.7
rmApplied associate-/l*2.7
if -4.079838345234971e+97 < (/ (* x (- y z)) (- t z)) < -3.2114266979681e-322Initial program 0.3
if -3.2114266979681e-322 < (/ (* x (- y z)) (- t z)) Initial program 11.6
rmApplied *-un-lft-identity11.6
Applied times-frac2.2
Simplified2.2
rmApplied div-sub2.2
Final simplification1.7
herbie shell --seed 2020103
(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)))