\frac{x - y}{z - y} \cdot t\begin{array}{l}
\mathbf{if}\;t \le -6.89452191581395419 \cdot 10^{-27} \lor \neg \left(t \le 2.6482603970997939 \cdot 10^{-30}\right):\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot t}{z - y}\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) (((double) (((double) (x - y)) / ((double) (z - y)))) * t));
}
double code(double x, double y, double z, double t) {
double VAR;
if (((t <= -6.894521915813954e-27) || !(t <= 2.648260397099794e-30))) {
VAR = ((double) (((double) (x - y)) * ((double) (t / ((double) (z - y))))));
} else {
VAR = ((double) (((double) (((double) (x - y)) * t)) / ((double) (z - y))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.3 |
|---|---|
| Target | 2.3 |
| Herbie | 2.2 |
if t < -6.89452191581395419e-27 or 2.6482603970997939e-30 < t Initial program 2.0
rmApplied div-inv2.1
Applied associate-*l*2.6
Simplified2.5
if -6.89452191581395419e-27 < t < 2.6482603970997939e-30Initial program 2.6
rmApplied associate-*l/1.8
Final simplification2.2
herbie shell --seed 2020161
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))