Average Error: 22.1 → 22.1
Time: 18.5s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{\left(t - a\right) \cdot z + x \cdot y}{\left(b - y\right) \cdot z + y}\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\frac{\left(t - a\right) \cdot z + x \cdot y}{\left(b - y\right) \cdot z + y}
double f(double x, double y, double z, double t, double a, double b) {
        double r39044634 = x;
        double r39044635 = y;
        double r39044636 = r39044634 * r39044635;
        double r39044637 = z;
        double r39044638 = t;
        double r39044639 = a;
        double r39044640 = r39044638 - r39044639;
        double r39044641 = r39044637 * r39044640;
        double r39044642 = r39044636 + r39044641;
        double r39044643 = b;
        double r39044644 = r39044643 - r39044635;
        double r39044645 = r39044637 * r39044644;
        double r39044646 = r39044635 + r39044645;
        double r39044647 = r39044642 / r39044646;
        return r39044647;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r39044648 = t;
        double r39044649 = a;
        double r39044650 = r39044648 - r39044649;
        double r39044651 = z;
        double r39044652 = r39044650 * r39044651;
        double r39044653 = x;
        double r39044654 = y;
        double r39044655 = r39044653 * r39044654;
        double r39044656 = r39044652 + r39044655;
        double r39044657 = b;
        double r39044658 = r39044657 - r39044654;
        double r39044659 = r39044658 * r39044651;
        double r39044660 = r39044659 + r39044654;
        double r39044661 = r39044656 / r39044660;
        return r39044661;
}

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.1
Target16.7
Herbie22.1
\[\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.1

    \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
  2. Using strategy rm
  3. Applied +-commutative22.1

    \[\leadsto \frac{x \cdot y + z \cdot \left(t - a\right)}{\color{blue}{z \cdot \left(b - y\right) + y}}\]
  4. Using strategy rm
  5. Applied *-commutative22.1

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

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

Reproduce

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