Average Error: 23.6 → 23.7
Time: 49.9s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{1}{z \cdot \left(b - y\right) + y} \cdot \left(z \cdot \left(t - a\right) + x \cdot y\right)\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\frac{1}{z \cdot \left(b - y\right) + y} \cdot \left(z \cdot \left(t - a\right) + x \cdot y\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r39896125 = x;
        double r39896126 = y;
        double r39896127 = r39896125 * r39896126;
        double r39896128 = z;
        double r39896129 = t;
        double r39896130 = a;
        double r39896131 = r39896129 - r39896130;
        double r39896132 = r39896128 * r39896131;
        double r39896133 = r39896127 + r39896132;
        double r39896134 = b;
        double r39896135 = r39896134 - r39896126;
        double r39896136 = r39896128 * r39896135;
        double r39896137 = r39896126 + r39896136;
        double r39896138 = r39896133 / r39896137;
        return r39896138;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r39896139 = 1.0;
        double r39896140 = z;
        double r39896141 = b;
        double r39896142 = y;
        double r39896143 = r39896141 - r39896142;
        double r39896144 = r39896140 * r39896143;
        double r39896145 = r39896144 + r39896142;
        double r39896146 = r39896139 / r39896145;
        double r39896147 = t;
        double r39896148 = a;
        double r39896149 = r39896147 - r39896148;
        double r39896150 = r39896140 * r39896149;
        double r39896151 = x;
        double r39896152 = r39896151 * r39896142;
        double r39896153 = r39896150 + r39896152;
        double r39896154 = r39896146 * r39896153;
        return r39896154;
}

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

Original23.6
Target18.6
Herbie23.7
\[\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 23.6

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

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

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

Reproduce

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