\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\left(x \cdot y + z \cdot \left(t - a\right)\right) \cdot \frac{1}{y + z \cdot \left(b - y\right)}(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(FPCore (x y z t a b) :precision binary64 (* (+ (* x y) (* z (- t a))) (/ 1.0 (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
return (((double) (((double) (x * y)) + ((double) (z * ((double) (t - a)))))) / ((double) (y + ((double) (z * ((double) (b - y)))))));
}
double code(double x, double y, double z, double t, double a, double b) {
return ((double) (((double) (((double) (x * y)) + ((double) (z * ((double) (t - a)))))) * (1.0 / ((double) (y + ((double) (z * ((double) (b - y)))))))));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b
Results
| Original | 22.5 |
|---|---|
| Target | 17.2 |
| Herbie | 22.5 |
Initial program Error: 22.5 bits
rmApplied div-invError: 22.5 bits
Final simplificationError: 22.5 bits
herbie shell --seed 2020204
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:herbie-target
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))