Average Error: 23.2 → 23.3
Time: 24.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)}{\left(z \cdot b + y\right) + \left(-y\right) \cdot z}\]
\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)}{\left(z \cdot b + y\right) + \left(-y\right) \cdot z}
double f(double x, double y, double z, double t, double a, double b) {
        double r559398 = x;
        double r559399 = y;
        double r559400 = r559398 * r559399;
        double r559401 = z;
        double r559402 = t;
        double r559403 = a;
        double r559404 = r559402 - r559403;
        double r559405 = r559401 * r559404;
        double r559406 = r559400 + r559405;
        double r559407 = b;
        double r559408 = r559407 - r559399;
        double r559409 = r559401 * r559408;
        double r559410 = r559399 + r559409;
        double r559411 = r559406 / r559410;
        return r559411;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r559412 = x;
        double r559413 = y;
        double r559414 = r559412 * r559413;
        double r559415 = z;
        double r559416 = t;
        double r559417 = a;
        double r559418 = r559416 - r559417;
        double r559419 = r559415 * r559418;
        double r559420 = r559414 + r559419;
        double r559421 = b;
        double r559422 = r559415 * r559421;
        double r559423 = r559422 + r559413;
        double r559424 = -r559413;
        double r559425 = r559424 * r559415;
        double r559426 = r559423 + r559425;
        double r559427 = r559420 / r559426;
        return r559427;
}

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.2
Target17.7
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.2

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

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

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

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

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

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

Reproduce

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