Average Error: 22.5 → 22.6
Time: 17.1s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\left(x \cdot y + z \cdot \left(t - a\right)\right) \cdot \frac{1}{y + z \cdot \left(b - y\right)}\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\left(x \cdot y + z \cdot \left(t - a\right)\right) \cdot \frac{1}{y + z \cdot \left(b - y\right)}
double f(double x, double y, double z, double t, double a, double b) {
        double r596925 = x;
        double r596926 = y;
        double r596927 = r596925 * r596926;
        double r596928 = z;
        double r596929 = t;
        double r596930 = a;
        double r596931 = r596929 - r596930;
        double r596932 = r596928 * r596931;
        double r596933 = r596927 + r596932;
        double r596934 = b;
        double r596935 = r596934 - r596926;
        double r596936 = r596928 * r596935;
        double r596937 = r596926 + r596936;
        double r596938 = r596933 / r596937;
        return r596938;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r596939 = x;
        double r596940 = y;
        double r596941 = r596939 * r596940;
        double r596942 = z;
        double r596943 = t;
        double r596944 = a;
        double r596945 = r596943 - r596944;
        double r596946 = r596942 * r596945;
        double r596947 = r596941 + r596946;
        double r596948 = 1.0;
        double r596949 = b;
        double r596950 = r596949 - r596940;
        double r596951 = r596942 * r596950;
        double r596952 = r596940 + r596951;
        double r596953 = r596948 / r596952;
        double r596954 = r596947 * r596953;
        return r596954;
}

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

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

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

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

Reproduce

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