\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} = -inf.0:\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\
\mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{t - z} \le -7.0388442481060592 \cdot 10^{-262} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 8.4245780664397174 \cdot 10^{-243}\right) \land \frac{x \cdot \left(y - z\right)}{t - z} \le 1.575964542475215 \cdot 10^{276}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\
\end{array}double code(double x, double y, double z, double t) {
return (((double) (x * ((double) (y - z)))) / ((double) (t - z)));
}
double code(double x, double y, double z, double t) {
double VAR;
if (((((double) (x * ((double) (y - z)))) / ((double) (t - z))) <= -inf.0)) {
VAR = ((double) (x * (((double) (y - z)) / ((double) (t - z)))));
} else {
double VAR_1;
if ((((((double) (x * ((double) (y - z)))) / ((double) (t - z))) <= -7.038844248106059e-262) || (!((((double) (x * ((double) (y - z)))) / ((double) (t - z))) <= 8.424578066439717e-243) && ((((double) (x * ((double) (y - z)))) / ((double) (t - z))) <= 1.575964542475215e+276)))) {
VAR_1 = (((double) (x * ((double) (y - z)))) / ((double) (t - z)));
} else {
VAR_1 = (x / (((double) (t - z)) / ((double) (y - 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.5 |
|---|---|
| Target | 2.3 |
| Herbie | 0.6 |
if (/ (* x (- y z)) (- t z)) < -inf.0Initial program 64.0
rmApplied *-un-lft-identity64.0
Applied times-frac0.1
Simplified0.1
if -inf.0 < (/ (* x (- y z)) (- t z)) < -7.0388442481060592e-262 or 8.4245780664397174e-243 < (/ (* x (- y z)) (- t z)) < 1.575964542475215e276Initial program 0.3
if -7.0388442481060592e-262 < (/ (* x (- y z)) (- t z)) < 8.4245780664397174e-243 or 1.575964542475215e276 < (/ (* x (- y z)) (- t z)) Initial program 23.6
rmApplied associate-/l*1.6
Final simplification0.6
herbie shell --seed 2020181
(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)))