Average Error: 22.9 → 22.9
Time: 24.7s
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 r492601 = x;
        double r492602 = y;
        double r492603 = r492601 * r492602;
        double r492604 = z;
        double r492605 = t;
        double r492606 = a;
        double r492607 = r492605 - r492606;
        double r492608 = r492604 * r492607;
        double r492609 = r492603 + r492608;
        double r492610 = b;
        double r492611 = r492610 - r492602;
        double r492612 = r492604 * r492611;
        double r492613 = r492602 + r492612;
        double r492614 = r492609 / r492613;
        return r492614;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r492615 = x;
        double r492616 = y;
        double r492617 = r492615 * r492616;
        double r492618 = z;
        double r492619 = t;
        double r492620 = a;
        double r492621 = r492619 - r492620;
        double r492622 = r492618 * r492621;
        double r492623 = r492617 + r492622;
        double r492624 = b;
        double r492625 = r492624 - r492616;
        double r492626 = r492618 * r492625;
        double r492627 = r492616 + r492626;
        double r492628 = r492623 / r492627;
        return r492628;
}

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.9
Target18.0
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.9

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

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

Reproduce

herbie shell --seed 2019325 +o rules:numerics
(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)))))