\frac{x}{y} \cdot \left(z - t\right) + t\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \le -5.86205391743587306 \cdot 10^{-208} \lor \neg \left(\frac{x}{y} \le 1.7162730782331399 \cdot 10^{-224} \lor \neg \left(\frac{x}{y} \le 1.76816687855064651 \cdot 10^{194}\right)\right):\\
\;\;\;\;\frac{x}{y} \cdot z + \left(t - t \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \left(z - t\right)\right) \cdot \frac{1}{y} + 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 (((((double) (x / y)) <= -5.862053917435873e-208) || !((((double) (x / y)) <= 1.71627307823314e-224) || !(((double) (x / y)) <= 1.7681668785506465e+194)))) {
VAR = ((double) (((double) (((double) (x / y)) * z)) + ((double) (t - ((double) (t * ((double) (x / y))))))));
} else {
VAR = ((double) (((double) (((double) (x * ((double) (z - t)))) * ((double) (1.0 / y)))) + t));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.1 |
|---|---|
| Target | 2.3 |
| Herbie | 0.9 |
if (/ x y) < -5.86205391743587306e-208 or 1.7162730782331399e-224 < (/ x y) < 1.76816687855064651e194Initial program 1.1
rmApplied sub-neg1.1
Applied distribute-lft-in1.1
Applied associate-+l+1.1
Simplified1.1
if -5.86205391743587306e-208 < (/ x y) < 1.7162730782331399e-224 or 1.76816687855064651e194 < (/ x y) Initial program 4.1
rmApplied div-inv4.1
Applied associate-*l*0.7
Simplified0.6
rmApplied div-inv0.7
Applied associate-*r*0.5
Final simplification0.9
herbie shell --seed 2020168
(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))