Average Error: 22.8 → 22.9
Time: 20.1s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{1}{z \cdot \left(b - y\right) + y} \cdot \left(z \cdot \left(t - a\right) + x \cdot y\right)\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\frac{1}{z \cdot \left(b - y\right) + y} \cdot \left(z \cdot \left(t - a\right) + x \cdot y\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r38981878 = x;
        double r38981879 = y;
        double r38981880 = r38981878 * r38981879;
        double r38981881 = z;
        double r38981882 = t;
        double r38981883 = a;
        double r38981884 = r38981882 - r38981883;
        double r38981885 = r38981881 * r38981884;
        double r38981886 = r38981880 + r38981885;
        double r38981887 = b;
        double r38981888 = r38981887 - r38981879;
        double r38981889 = r38981881 * r38981888;
        double r38981890 = r38981879 + r38981889;
        double r38981891 = r38981886 / r38981890;
        return r38981891;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r38981892 = 1.0;
        double r38981893 = z;
        double r38981894 = b;
        double r38981895 = y;
        double r38981896 = r38981894 - r38981895;
        double r38981897 = r38981893 * r38981896;
        double r38981898 = r38981897 + r38981895;
        double r38981899 = r38981892 / r38981898;
        double r38981900 = t;
        double r38981901 = a;
        double r38981902 = r38981900 - r38981901;
        double r38981903 = r38981893 * r38981902;
        double r38981904 = x;
        double r38981905 = r38981904 * r38981895;
        double r38981906 = r38981903 + r38981905;
        double r38981907 = r38981899 * r38981906;
        return r38981907;
}

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.9
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 div-inv22.9

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

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

Reproduce

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