Average Error: 23.3 → 23.3
Time: 18.1s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\left(x \cdot y + z \cdot \left(t - a\right)\right) \cdot \frac{1}{y + z \cdot \left(b - y\right)}\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\left(x \cdot y + z \cdot \left(t - a\right)\right) \cdot \frac{1}{y + z \cdot \left(b - y\right)}
double f(double x, double y, double z, double t, double a, double b) {
        double r530562 = x;
        double r530563 = y;
        double r530564 = r530562 * r530563;
        double r530565 = z;
        double r530566 = t;
        double r530567 = a;
        double r530568 = r530566 - r530567;
        double r530569 = r530565 * r530568;
        double r530570 = r530564 + r530569;
        double r530571 = b;
        double r530572 = r530571 - r530563;
        double r530573 = r530565 * r530572;
        double r530574 = r530563 + r530573;
        double r530575 = r530570 / r530574;
        return r530575;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r530576 = x;
        double r530577 = y;
        double r530578 = r530576 * r530577;
        double r530579 = z;
        double r530580 = t;
        double r530581 = a;
        double r530582 = r530580 - r530581;
        double r530583 = r530579 * r530582;
        double r530584 = r530578 + r530583;
        double r530585 = 1.0;
        double r530586 = b;
        double r530587 = r530586 - r530577;
        double r530588 = r530579 * r530587;
        double r530589 = r530577 + r530588;
        double r530590 = r530585 / r530589;
        double r530591 = r530584 * r530590;
        return r530591;
}

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.3
Target18.1
Herbie23.3
\[\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.3

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

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

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

Reproduce

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