\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} \leq -5.952252119762416 \cdot 10^{+264} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \leq 1.3347842911496855 \cdot 10^{+300}\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)) -5.952252119762416e+264)
(not (<= (/ (* x (- y z)) (- t z)) 1.3347842911496855e+300)))
(* 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)) <= -5.952252119762416e+264) || !(((x * (y - z)) / (t - z)) <= 1.3347842911496855e+300)) {
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.3 |
|---|---|
| Target | 2.1 |
| Herbie | 1.2 |
if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -5.95225211976241631e264 or 1.33478429114968551e300 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) Initial program 59.6
rmApplied *-un-lft-identity_binary64_1508259.6
Applied times-frac_binary64_150880.8
if -5.95225211976241631e264 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 1.33478429114968551e300Initial program 1.3
Final simplification1.2
herbie shell --seed 2021043
(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)))