\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.49472440264539668 \cdot 10^{76} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 4.7703587704786577 \cdot 10^{284}\right):\\
\;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{t - z}{x \cdot \left(y - 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)) <= -2.4947244026453967e+76) || !(((x * (y - z)) / (t - z)) <= 4.770358770478658e+284))) {
VAR = (x / ((t - z) / (y - z)));
} else {
VAR = (1.0 / ((t - z) / (x * (y - z))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.3 |
|---|---|
| Target | 2.0 |
| Herbie | 1.7 |
if (/ (* x (- y z)) (- t z)) < -2.4947244026453967e+76 or 4.770358770478658e+284 < (/ (* x (- y z)) (- t z)) Initial program 41.3
rmApplied associate-/l*1.8
if -2.4947244026453967e+76 < (/ (* x (- y z)) (- t z)) < 4.770358770478658e+284Initial program 1.3
rmApplied clear-num1.7
Final simplification1.7
herbie shell --seed 2020105 +o rules:numerics
(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)))