Average Error: 22.9 → 22.9
Time: 20.5s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{1}{y + z \cdot \left(b - y\right)} \cdot \left(\left(z \cdot t + x \cdot y\right) + \left(-a\right) \cdot z\right)\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\frac{1}{y + z \cdot \left(b - y\right)} \cdot \left(\left(z \cdot t + x \cdot y\right) + \left(-a\right) \cdot z\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r39315707 = x;
        double r39315708 = y;
        double r39315709 = r39315707 * r39315708;
        double r39315710 = z;
        double r39315711 = t;
        double r39315712 = a;
        double r39315713 = r39315711 - r39315712;
        double r39315714 = r39315710 * r39315713;
        double r39315715 = r39315709 + r39315714;
        double r39315716 = b;
        double r39315717 = r39315716 - r39315708;
        double r39315718 = r39315710 * r39315717;
        double r39315719 = r39315708 + r39315718;
        double r39315720 = r39315715 / r39315719;
        return r39315720;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r39315721 = 1.0;
        double r39315722 = y;
        double r39315723 = z;
        double r39315724 = b;
        double r39315725 = r39315724 - r39315722;
        double r39315726 = r39315723 * r39315725;
        double r39315727 = r39315722 + r39315726;
        double r39315728 = r39315721 / r39315727;
        double r39315729 = t;
        double r39315730 = r39315723 * r39315729;
        double r39315731 = x;
        double r39315732 = r39315731 * r39315722;
        double r39315733 = r39315730 + r39315732;
        double r39315734 = a;
        double r39315735 = -r39315734;
        double r39315736 = r39315735 * r39315723;
        double r39315737 = r39315733 + r39315736;
        double r39315738 = r39315728 * r39315737;
        return r39315738;
}

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
Target17.8
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. Using strategy rm
  3. Applied sub-neg22.9

    \[\leadsto \frac{x \cdot y + z \cdot \color{blue}{\left(t + \left(-a\right)\right)}}{y + z \cdot \left(b - y\right)}\]
  4. Applied distribute-lft-in22.9

    \[\leadsto \frac{x \cdot y + \color{blue}{\left(z \cdot t + z \cdot \left(-a\right)\right)}}{y + z \cdot \left(b - y\right)}\]
  5. Applied associate-+r+22.9

    \[\leadsto \frac{\color{blue}{\left(x \cdot y + z \cdot t\right) + z \cdot \left(-a\right)}}{y + z \cdot \left(b - y\right)}\]
  6. Using strategy rm
  7. Applied div-inv22.9

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

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

Reproduce

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