\frac{x - y}{z - y} \cdot t\begin{array}{l}
\mathbf{if}\;y \le -8.72434399653163883 \cdot 10^{-74} \lor \neg \left(y \le 9.7809318527076706 \cdot 10^{-114}\right):\\
\;\;\;\;\left(\frac{x}{z - y} + \frac{-1}{\frac{z}{y} + -1}\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{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 (((y <= -8.724343996531639e-74) || !(y <= 9.78093185270767e-114))) {
VAR = ((double) (((double) (((double) (x / ((double) (z - y)))) + ((double) (-1.0 / ((double) (((double) (z / y)) + -1.0)))))) * t));
} else {
VAR = ((double) (((double) (x - y)) * ((double) (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.3 |
if y < -8.72434399653163883e-74 or 9.7809318527076706e-114 < y Initial program 0.5
rmApplied div-sub0.5
rmApplied clear-num0.6
Simplified0.6
if -8.72434399653163883e-74 < y < 9.7809318527076706e-114Initial program 6.0
Simplified5.9
Final simplification2.3
herbie shell --seed 2020184
(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))