\frac{x}{y} \cdot \left(z - t\right) + t\begin{array}{l}
\mathbf{if}\;y \le -1.214276496349715308350212003616713772243 \cdot 10^{208}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{y}, z - t, t\right)\\
\mathbf{elif}\;y \le 3.810917599276301682261457087969902172823 \cdot 10^{77}:\\
\;\;\;\;\frac{x \cdot \left(z - t\right)}{y} + t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{y}, x, t\right)\\
\end{array}double f(double x, double y, double z, double t) {
double r23927472 = x;
double r23927473 = y;
double r23927474 = r23927472 / r23927473;
double r23927475 = z;
double r23927476 = t;
double r23927477 = r23927475 - r23927476;
double r23927478 = r23927474 * r23927477;
double r23927479 = r23927478 + r23927476;
return r23927479;
}
double f(double x, double y, double z, double t) {
double r23927480 = y;
double r23927481 = -1.2142764963497153e+208;
bool r23927482 = r23927480 <= r23927481;
double r23927483 = x;
double r23927484 = r23927483 / r23927480;
double r23927485 = z;
double r23927486 = t;
double r23927487 = r23927485 - r23927486;
double r23927488 = fma(r23927484, r23927487, r23927486);
double r23927489 = 3.8109175992763017e+77;
bool r23927490 = r23927480 <= r23927489;
double r23927491 = r23927483 * r23927487;
double r23927492 = r23927491 / r23927480;
double r23927493 = r23927492 + r23927486;
double r23927494 = r23927487 / r23927480;
double r23927495 = fma(r23927494, r23927483, r23927486);
double r23927496 = r23927490 ? r23927493 : r23927495;
double r23927497 = r23927482 ? r23927488 : r23927496;
return r23927497;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
| Original | 2.3 |
|---|---|
| Target | 2.5 |
| Herbie | 2.8 |
if y < -1.2142764963497153e+208Initial program 1.8
rmApplied fma-def1.8
if -1.2142764963497153e+208 < y < 3.8109175992763017e+77Initial program 2.8
rmApplied associate-*l/3.5
if 3.8109175992763017e+77 < y Initial program 1.1
Simplified1.4
Final simplification2.8
herbie shell --seed 2019168 +o rules:numerics
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cget from hsignal-0.2.7.1"
:herbie-target
(if (< z 2.759456554562692e-282) (+ (* (/ x y) (- z t)) t) (if (< z 2.326994450874436e-110) (+ (* x (/ (- z t) y)) t) (+ (* (/ x y) (- z t)) t)))
(+ (* (/ x y) (- z t)) t))