Average Error: 23.3 → 23.3
Time: 6.9s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
double f(double x, double y, double z, double t, double a, double b) {
        double r788972 = x;
        double r788973 = y;
        double r788974 = r788972 * r788973;
        double r788975 = z;
        double r788976 = t;
        double r788977 = a;
        double r788978 = r788976 - r788977;
        double r788979 = r788975 * r788978;
        double r788980 = r788974 + r788979;
        double r788981 = b;
        double r788982 = r788981 - r788973;
        double r788983 = r788975 * r788982;
        double r788984 = r788973 + r788983;
        double r788985 = r788980 / r788984;
        return r788985;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r788986 = x;
        double r788987 = y;
        double r788988 = r788986 * r788987;
        double r788989 = z;
        double r788990 = t;
        double r788991 = a;
        double r788992 = r788990 - r788991;
        double r788993 = r788989 * r788992;
        double r788994 = r788988 + r788993;
        double r788995 = b;
        double r788996 = r788995 - r788987;
        double r788997 = r788989 * r788996;
        double r788998 = r788987 + r788997;
        double r788999 = r788994 / r788998;
        return r788999;
}

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

Original23.3
Target18.2
Herbie23.3
\[\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 23.3

    \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
  2. Final simplification23.3

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

Reproduce

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