\frac{x - y}{z - y} \cdot t\begin{array}{l}
\mathbf{if}\;y \le -9.3910125961314414 \cdot 10^{-161} \lor \neg \left(y \le 6.0401320354982989 \cdot 10^{-75}\right):\\
\;\;\;\;\frac{x - y}{z - y} \cdot t\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{1}}{1} \cdot \left(\left(x - y\right) \cdot \frac{t}{z - y}\right)\\
\end{array}double code(double x, double y, double z, double t) {
return (((x - y) / (z - y)) * t);
}
double code(double x, double y, double z, double t) {
double temp;
if (((y <= -9.391012596131441e-161) || !(y <= 6.040132035498299e-75))) {
temp = (((x - y) / (z - y)) * t);
} else {
temp = ((sqrt(1.0) / 1.0) * ((x - y) * (t / (z - y))));
}
return temp;
}




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.4 |
if y < -9.391012596131441e-161 or 6.040132035498299e-75 < y Initial program 1.0
if -9.391012596131441e-161 < y < 6.040132035498299e-75Initial program 5.7
rmApplied clear-num6.1
rmApplied *-un-lft-identity6.1
Applied *-un-lft-identity6.1
Applied times-frac6.1
Applied add-sqr-sqrt6.1
Applied times-frac6.1
Applied associate-*l*6.1
Simplified5.7
rmApplied div-sub5.7
rmApplied div-inv5.7
Applied div-inv5.7
Applied distribute-rgt-out--5.7
Applied *-un-lft-identity5.7
Applied times-frac6.3
Simplified6.2
Final simplification2.4
herbie shell --seed 2020056 +o rules:numerics
(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))