\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} \le -2.3395275225176602 \cdot 10^{243}:\\
\;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\
\mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{t - z} \le 1.80176442918762791 \cdot 10^{304}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z))));
}
double code(double x, double y, double z, double t) {
double VAR;
if ((((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z)))) <= -2.3395275225176602e+243)) {
VAR = ((double) (x / ((double) (((double) (t - z)) / ((double) (y - z))))));
} else {
double VAR_1;
if ((((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z)))) <= 1.801764429187628e+304)) {
VAR_1 = ((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z))));
} else {
VAR_1 = ((double) (x * ((double) (((double) (y - z)) / ((double) (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.2 |
| Herbie | 1.2 |
if (/ (* x (- y z)) (- t z)) < -2.3395275225176602e243Initial program 53.1
rmApplied associate-/l*1.2
if -2.3395275225176602e243 < (/ (* x (- y z)) (- t z)) < 1.80176442918762791e304Initial program 1.4
if 1.80176442918762791e304 < (/ (* x (- y z)) (- t z)) Initial program 63.5
rmApplied *-un-lft-identity63.5
Applied times-frac0.1
Simplified0.1
Final simplification1.2
herbie shell --seed 2020162
(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)))