\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;x \leq -2.1121188610291946 \cdot 10^{-285} \lor \neg \left(x \leq 5.094111444011304 \cdot 10^{+31}\right):\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\
\end{array}(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.1121188610291946e-285) (not (<= x 5.094111444011304e+31))) (* x (/ (- y z) (- t z))) (/ (* x (- y z)) (- t z))))
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 tmp;
if ((x <= -2.1121188610291946e-285) || !(x <= 5.094111444011304e+31)) {
tmp = x * ((y - z) / (t - z));
} else {
tmp = (x * (y - z)) / (t - z);
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.9 |
|---|---|
| Target | 2.4 |
| Herbie | 2.3 |
if x < -2.1121188610291946e-285 or 5.0941114440113043e31 < x Initial program 16.2
rmApplied *-un-lft-identity_binary6416.2
Applied times-frac_binary642.3
Simplified2.3
if -2.1121188610291946e-285 < x < 5.0941114440113043e31Initial program 2.3
Final simplification2.3
herbie shell --seed 2020220
(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)))