\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;x \leq -12322005424938166 \lor \neg \left(x \leq 6.066042882022291 \cdot 10^{-266}\right):\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \left(y - z\right)\right) \cdot \frac{1}{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 -12322005424938166.0) (not (<= x 6.066042882022291e-266))) (* x (/ (- y z) (- t z))) (* (* x (- y z)) (/ 1.0 (- 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 <= -12322005424938166.0) || !(x <= 6.066042882022291e-266)) {
tmp = x * ((y - z) / (t - z));
} else {
tmp = (x * (y - z)) * (1.0 / (t - z));
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.5 |
|---|---|
| Target | 2.1 |
| Herbie | 2.0 |
if x < -12322005424938166 or 6.0660428820222911e-266 < x Initial program 16.0
rmApplied *-un-lft-identity_binary64_1727916.0
Applied times-frac_binary64_172852.0
Simplified2.0
if -12322005424938166 < x < 6.0660428820222911e-266Initial program 2.1
rmApplied div-inv_binary64_172762.2
Final simplification2.0
herbie shell --seed 2020277
(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)))