Average Error: 22.8 → 22.9
Time: 5.9s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{\frac{1}{y + z \cdot \left(b - y\right)}}{\frac{1}{x \cdot y + z \cdot \left(t - a\right)}}\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\frac{\frac{1}{y + z \cdot \left(b - y\right)}}{\frac{1}{x \cdot y + z \cdot \left(t - a\right)}}
double f(double x, double y, double z, double t, double a, double b) {
        double r919861 = x;
        double r919862 = y;
        double r919863 = r919861 * r919862;
        double r919864 = z;
        double r919865 = t;
        double r919866 = a;
        double r919867 = r919865 - r919866;
        double r919868 = r919864 * r919867;
        double r919869 = r919863 + r919868;
        double r919870 = b;
        double r919871 = r919870 - r919862;
        double r919872 = r919864 * r919871;
        double r919873 = r919862 + r919872;
        double r919874 = r919869 / r919873;
        return r919874;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r919875 = 1.0;
        double r919876 = y;
        double r919877 = z;
        double r919878 = b;
        double r919879 = r919878 - r919876;
        double r919880 = r919877 * r919879;
        double r919881 = r919876 + r919880;
        double r919882 = r919875 / r919881;
        double r919883 = x;
        double r919884 = r919883 * r919876;
        double r919885 = t;
        double r919886 = a;
        double r919887 = r919885 - r919886;
        double r919888 = r919877 * r919887;
        double r919889 = r919884 + r919888;
        double r919890 = r919875 / r919889;
        double r919891 = r919882 / r919890;
        return r919891;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original22.8
Target17.7
Herbie22.9
\[\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}\]

Derivation

  1. Initial program 22.8

    \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
  2. Using strategy rm
  3. Applied clear-num22.9

    \[\leadsto \color{blue}{\frac{1}{\frac{y + z \cdot \left(b - y\right)}{x \cdot y + z \cdot \left(t - a\right)}}}\]
  4. Using strategy rm
  5. Applied div-inv22.9

    \[\leadsto \frac{1}{\color{blue}{\left(y + z \cdot \left(b - y\right)\right) \cdot \frac{1}{x \cdot y + z \cdot \left(t - a\right)}}}\]
  6. Applied associate-/r*22.9

    \[\leadsto \color{blue}{\frac{\frac{1}{y + z \cdot \left(b - y\right)}}{\frac{1}{x \cdot y + z \cdot \left(t - a\right)}}}\]
  7. Final simplification22.9

    \[\leadsto \frac{\frac{1}{y + z \cdot \left(b - y\right)}}{\frac{1}{x \cdot y + z \cdot \left(t - a\right)}}\]

Reproduce

herbie shell --seed 2020062 
(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)))))