Average Error: 22.4 → 22.5
Time: 20.1s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{1}{\frac{y + \left(b - y\right) \cdot z}{\left(t - a\right) \cdot z + y \cdot x}}\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\frac{1}{\frac{y + \left(b - y\right) \cdot z}{\left(t - a\right) \cdot z + y \cdot x}}
double f(double x, double y, double z, double t, double a, double b) {
        double r39842862 = x;
        double r39842863 = y;
        double r39842864 = r39842862 * r39842863;
        double r39842865 = z;
        double r39842866 = t;
        double r39842867 = a;
        double r39842868 = r39842866 - r39842867;
        double r39842869 = r39842865 * r39842868;
        double r39842870 = r39842864 + r39842869;
        double r39842871 = b;
        double r39842872 = r39842871 - r39842863;
        double r39842873 = r39842865 * r39842872;
        double r39842874 = r39842863 + r39842873;
        double r39842875 = r39842870 / r39842874;
        return r39842875;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r39842876 = 1.0;
        double r39842877 = y;
        double r39842878 = b;
        double r39842879 = r39842878 - r39842877;
        double r39842880 = z;
        double r39842881 = r39842879 * r39842880;
        double r39842882 = r39842877 + r39842881;
        double r39842883 = t;
        double r39842884 = a;
        double r39842885 = r39842883 - r39842884;
        double r39842886 = r39842885 * r39842880;
        double r39842887 = x;
        double r39842888 = r39842877 * r39842887;
        double r39842889 = r39842886 + r39842888;
        double r39842890 = r39842882 / r39842889;
        double r39842891 = r39842876 / r39842890;
        return r39842891;
}

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.4
Target17.5
Herbie22.5
\[\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.4

    \[\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.5

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

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

Reproduce

herbie shell --seed 2019163 
(FPCore (x y z t a b)
  :name "Development.Shake.Progress:decay from shake-0.15.5"

  :herbie-target
  (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))

  (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))