\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} \leq -\infty \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \leq -6.4936172517961325 \cdot 10^{-301}\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 (- y z)) (- t z)) (- INFINITY))
(not (<= (/ (* x (- y z)) (- t z)) -6.4936172517961325e-301)))
(* 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 * (y - z)) / (t - z)) <= -((double) INFINITY)) || !(((x * (y - z)) / (t - z)) <= -6.4936172517961325e-301)) {
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.6 |
|---|---|
| Target | 2.0 |
| Herbie | 1.3 |
if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -inf.0 or -6.4936172517961325e-301 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) Initial program 17.7
rmApplied *-un-lft-identity_binary64_1793817.7
Applied times-frac_binary64_179441.9
Simplified1.9
if -inf.0 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -6.4936172517961325e-301Initial program 0.3
Final simplification1.3
herbie shell --seed 2020281
(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)))