\frac{x}{y} \cdot \left(z - t\right) + t\begin{array}{l}
\mathbf{if}\;x \le -4.0517538917623928 \cdot 10^{144}:\\
\;\;\;\;x \cdot \left(\left(z - t\right) \cdot \frac{1}{y}\right) + t\\
\mathbf{elif}\;x \le 9.00134916517873369 \cdot 10^{-279}:\\
\;\;\;\;\frac{x \cdot \left(z - t\right)}{y} + t\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \left(z - t\right) + t\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) (((double) (((double) (x / y)) * ((double) (z - t)))) + t));
}
double code(double x, double y, double z, double t) {
double VAR;
if ((x <= -4.051753891762393e+144)) {
VAR = ((double) (((double) (x * ((double) (((double) (z - t)) * ((double) (1.0 / y)))))) + t));
} else {
double VAR_1;
if ((x <= 9.001349165178734e-279)) {
VAR_1 = ((double) (((double) (((double) (x * ((double) (z - t)))) / y)) + t));
} else {
VAR_1 = ((double) (((double) (((double) (x / y)) * ((double) (z - t)))) + t));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 1.9 |
|---|---|
| Target | 2.3 |
| Herbie | 2.5 |
if x < -4.0517538917623928e144Initial program 5.7
rmApplied div-inv5.8
Applied associate-*l*3.0
Simplified2.9
rmApplied div-inv3.0
if -4.0517538917623928e144 < x < 9.00134916517873369e-279Initial program 1.2
rmApplied associate-*l/3.0
if 9.00134916517873369e-279 < x Initial program 2.0
Final simplification2.5
herbie shell --seed 2020155
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cget from hsignal-0.2.7.1"
:precision binary64
: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))