\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\frac{1}{\frac{\frac{\mathsf{fma}\left(b, z, y\right)}{1}}{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)} - \frac{z}{\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{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)))))) / ((double) (y + ((double) (z * ((double) (b - y))))))));
}
double code(double x, double y, double z, double t, double a, double b) {
return ((double) (1.0 / ((double) (((double) (((double) (((double) fma(b, z, y)) / 1.0)) / ((double) fma(x, y, ((double) (z * ((double) (t - a)))))))) - ((double) (z / ((double) (((double) fma(x, y, ((double) (z * ((double) (t - a)))))) / 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 | 23.3 |
|---|---|
| Target | 18.2 |
| Herbie | 22.6 |
Initial program 23.3
rmApplied sub-neg23.3
Applied distribute-lft-in23.4
rmApplied clear-num23.5
rmApplied distribute-rgt-neg-out23.5
Applied unsub-neg23.5
Applied associate-+r-23.5
Applied div-sub23.5
Simplified23.5
Simplified22.6
Final simplification22.6
herbie shell --seed 2020122 +o rules:numerics
(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)))))