\frac{x \cdot \left(y - z\right)}{t - z}
\begin{array}{l}
t_1 := \frac{x \cdot \left(y - z\right)}{t - z}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\
\mathbf{elif}\;t_1 \leq 9.296864973976425 \cdot 10^{+300}:\\
\;\;\;\;\frac{x \cdot y - x \cdot z}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\
\end{array}
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (* x (- y z)) (- t z))))
(if (<= t_1 (- INFINITY))
(/ x (/ (- t z) (- y z)))
(if (<= t_1 9.296864973976425e+300)
(/ (- (* x y) (* x 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 t_1 = (x * (y - z)) / (t - z);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x / ((t - z) / (y - z));
} else if (t_1 <= 9.296864973976425e+300) {
tmp = ((x * y) - (x * 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.2 |
| Herbie | 1.1 |
if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -inf.0Initial program 64.0
Applied associate-/l*_binary640.1
if -inf.0 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 9.2968649739764245e300Initial program 1.3
Applied *-un-lft-identity_binary641.3
Applied cancel-sign-sub-inv_binary641.3
Applied distribute-lft-in_binary641.3
if 9.2968649739764245e300 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) Initial program 63.1
Applied *-un-lft-identity_binary6463.1
Applied times-frac_binary640.1
Simplified0.1
Final simplification1.1
herbie shell --seed 2021307
(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)))