\frac{x}{y} \cdot \left(z - t\right) + t\frac{x}{\frac{y}{z - t}} + tdouble f(double x, double y, double z, double t) {
double r334119 = x;
double r334120 = y;
double r334121 = r334119 / r334120;
double r334122 = z;
double r334123 = t;
double r334124 = r334122 - r334123;
double r334125 = r334121 * r334124;
double r334126 = r334125 + r334123;
return r334126;
}
double f(double x, double y, double z, double t) {
double r334127 = x;
double r334128 = y;
double r334129 = z;
double r334130 = t;
double r334131 = r334129 - r334130;
double r334132 = r334128 / r334131;
double r334133 = r334127 / r334132;
double r334134 = r334133 + r334130;
return r334134;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.0 |
|---|---|
| Target | 2.2 |
| Herbie | 5.8 |
if (/ x y) < -8.800041534266765e+168Initial program 15.7
rmApplied associate-*l/3.3
rmApplied associate-/l*1.4
if -8.800041534266765e+168 < (/ x y) Initial program 1.4
rmApplied sub-neg1.4
Applied distribute-lft-in1.4
Final simplification5.8
herbie shell --seed 2019297
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cget from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(if (< z 2.7594565545626922e-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))