\frac{x - y}{z - y} \cdot t\begin{array}{l}
\mathbf{if}\;y \le -1.8586745194188488 \cdot 10^{-190}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x - y}}\\
\mathbf{elif}\;y \le 6.790926987711054 \cdot 10^{-54}:\\
\;\;\;\;\frac{t \cdot \left(x - y\right)}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x - y}}\\
\end{array}double f(double x, double y, double z, double t) {
double r22815200 = x;
double r22815201 = y;
double r22815202 = r22815200 - r22815201;
double r22815203 = z;
double r22815204 = r22815203 - r22815201;
double r22815205 = r22815202 / r22815204;
double r22815206 = t;
double r22815207 = r22815205 * r22815206;
return r22815207;
}
double f(double x, double y, double z, double t) {
double r22815208 = y;
double r22815209 = -1.8586745194188488e-190;
bool r22815210 = r22815208 <= r22815209;
double r22815211 = t;
double r22815212 = z;
double r22815213 = r22815212 - r22815208;
double r22815214 = x;
double r22815215 = r22815214 - r22815208;
double r22815216 = r22815213 / r22815215;
double r22815217 = r22815211 / r22815216;
double r22815218 = 6.790926987711054e-54;
bool r22815219 = r22815208 <= r22815218;
double r22815220 = r22815211 * r22815215;
double r22815221 = r22815220 / r22815213;
double r22815222 = r22815219 ? r22815221 : r22815217;
double r22815223 = r22815210 ? r22815217 : r22815222;
return r22815223;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.2 |
|---|---|
| Target | 2.2 |
| Herbie | 2.1 |
if y < -1.8586745194188488e-190 or 6.790926987711054e-54 < y Initial program 0.8
rmApplied clear-num0.9
rmApplied associate-*l/0.8
Simplified0.8
if -1.8586745194188488e-190 < y < 6.790926987711054e-54Initial program 5.6
rmApplied associate-*l/5.5
Final simplification2.1
herbie shell --seed 2019163 +o rules:numerics
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:herbie-target
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))