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 ((y <= -1.0595863515421569e+87)) {
VAR = ((double) (t + ((double) (x / ((double) (y / ((double) (z - t))))))));
} else {
double VAR_1;
if ((y <= 3.007497839648298e-58)) {
VAR_1 = ((double) (t + ((double) (((double) (x * ((double) (z - t)))) / y))));
} else {
VAR_1 = ((double) (t + ((double) (((double) (z - t)) * ((double) (x / y))))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.1 |
|---|---|
| Target | 2.4 |
| Herbie | 1.7 |
if y < -1.0595863515421569e87Initial program 1.5
rmApplied associate-*l/10.7
rmApplied associate-/l*1.5
if -1.0595863515421569e87 < y < 3.0074978396482981e-58Initial program 3.4
rmApplied associate-*l/2.5
if 3.0074978396482981e-58 < y Initial program 1.1
Final simplification1.7
herbie shell --seed 2020190
(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))