Average Error: 22.9 → 22.9
Time: 18.8s
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 r545650 = x;
        double r545651 = y;
        double r545652 = r545650 * r545651;
        double r545653 = z;
        double r545654 = t;
        double r545655 = a;
        double r545656 = r545654 - r545655;
        double r545657 = r545653 * r545656;
        double r545658 = r545652 + r545657;
        double r545659 = b;
        double r545660 = r545659 - r545651;
        double r545661 = r545653 * r545660;
        double r545662 = r545651 + r545661;
        double r545663 = r545658 / r545662;
        return r545663;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r545664 = x;
        double r545665 = y;
        double r545666 = r545664 * r545665;
        double r545667 = z;
        double r545668 = t;
        double r545669 = a;
        double r545670 = r545668 - r545669;
        double r545671 = r545667 * r545670;
        double r545672 = r545666 + r545671;
        double r545673 = b;
        double r545674 = r545673 - r545665;
        double r545675 = r545667 * r545674;
        double r545676 = r545665 + r545675;
        double r545677 = r545672 / r545676;
        return r545677;
}

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 2019306 
(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)))))