Average Error: 23.1 → 23.1
Time: 14.2s
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 r15150546 = x;
        double r15150547 = y;
        double r15150548 = r15150546 * r15150547;
        double r15150549 = z;
        double r15150550 = t;
        double r15150551 = a;
        double r15150552 = r15150550 - r15150551;
        double r15150553 = r15150549 * r15150552;
        double r15150554 = r15150548 + r15150553;
        double r15150555 = b;
        double r15150556 = r15150555 - r15150547;
        double r15150557 = r15150549 * r15150556;
        double r15150558 = r15150547 + r15150557;
        double r15150559 = r15150554 / r15150558;
        return r15150559;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r15150560 = 1.0;
        double r15150561 = z;
        double r15150562 = b;
        double r15150563 = y;
        double r15150564 = r15150562 - r15150563;
        double r15150565 = r15150561 * r15150564;
        double r15150566 = r15150565 + r15150563;
        double r15150567 = r15150560 / r15150566;
        double r15150568 = t;
        double r15150569 = a;
        double r15150570 = r15150568 - r15150569;
        double r15150571 = r15150561 * r15150570;
        double r15150572 = x;
        double r15150573 = r15150572 * r15150563;
        double r15150574 = r15150571 + r15150573;
        double r15150575 = r15150567 * r15150574;
        return r15150575;
}

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.1
Target17.7
Herbie23.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 23.1

    \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
  2. Using strategy rm
  3. Applied +-commutative23.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 div-inv23.1

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

    \[\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 2019156 
(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)))))