\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:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\
\mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{t - z} \leq -4.699853111594 \cdot 10^{-316}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\
\end{array}(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
(FPCore (x y z t)
:precision binary64
(if (<= (/ (* x (- y z)) (- t z)) (- INFINITY))
(* (- y z) (/ x (- t z)))
(if (<= (/ (* x (- y z)) (- t z)) -4.699853111594e-316)
(/ (* x (- y z)) (- t z))
(/ x (/ (- t z) (- y z))))))double code(double x, double y, double z, double t) {
return (((double) (x * ((double) (y - z)))) / ((double) (t - z)));
}
double code(double x, double y, double z, double t) {
double tmp;
if (((((double) (x * ((double) (y - z)))) / ((double) (t - z))) <= ((double) -(((double) INFINITY))))) {
tmp = ((double) (((double) (y - z)) * (x / ((double) (t - z)))));
} else {
double tmp_1;
if (((((double) (x * ((double) (y - z)))) / ((double) (t - z))) <= -4.699853111594e-316)) {
tmp_1 = (((double) (x * ((double) (y - z)))) / ((double) (t - z)));
} else {
tmp_1 = (x / (((double) (t - z)) / ((double) (y - z))));
}
tmp = tmp_1;
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.4 |
|---|---|
| Target | 2.4 |
| Herbie | 1.2 |
if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -inf.0Initial program 64.0
rmApplied associate-/l*_binary640.1
rmApplied associate-/r/_binary640.2
if -inf.0 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -4.699853112e-316Initial program 0.3
if -4.699853112e-316 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) Initial program 10.6
rmApplied associate-/l*_binary642.0
Final simplification1.2
herbie shell --seed 2020205
(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)))