\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right) + z \cdot \mathsf{fma}\left(-\sqrt[3]{a}, \sqrt[3]{a} \cdot \sqrt[3]{a}, \sqrt[3]{a} \cdot \left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right)\right)}{y + z \cdot \left(b - y\right)}double code(double x, double y, double z, double t, double a, double b) {
return (((x * y) + (z * (t - a))) / (y + (z * (b - y))));
}
double code(double x, double y, double z, double t, double a, double b) {
return ((fma(x, y, (z * (t - a))) + (z * fma(-cbrt(a), (cbrt(a) * cbrt(a)), (cbrt(a) * (cbrt(a) * cbrt(a)))))) / (y + (z * (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 | 23.5 |
|---|---|
| Target | 18.4 |
| Herbie | 23.5 |
Initial program 23.5
rmApplied add-cube-cbrt23.6
Applied add-sqr-sqrt43.9
Applied prod-diff43.9
Applied distribute-lft-in43.9
Applied associate-+r+43.9
Simplified23.5
Final simplification23.5
herbie shell --seed 2020060 +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)))))