Average Error: 23.6 → 23.7
Time: 6.7s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{1}{\frac{y + z \cdot \left(b - y\right)}{x \cdot y + z \cdot \left(t - a\right)}}\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\frac{1}{\frac{y + z \cdot \left(b - y\right)}{x \cdot y + z \cdot \left(t - a\right)}}
double f(double x, double y, double z, double t, double a, double b) {
        double r811516 = x;
        double r811517 = y;
        double r811518 = r811516 * r811517;
        double r811519 = z;
        double r811520 = t;
        double r811521 = a;
        double r811522 = r811520 - r811521;
        double r811523 = r811519 * r811522;
        double r811524 = r811518 + r811523;
        double r811525 = b;
        double r811526 = r811525 - r811517;
        double r811527 = r811519 * r811526;
        double r811528 = r811517 + r811527;
        double r811529 = r811524 / r811528;
        return r811529;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r811530 = 1.0;
        double r811531 = y;
        double r811532 = z;
        double r811533 = b;
        double r811534 = r811533 - r811531;
        double r811535 = r811532 * r811534;
        double r811536 = r811531 + r811535;
        double r811537 = x;
        double r811538 = r811537 * r811531;
        double r811539 = t;
        double r811540 = a;
        double r811541 = r811539 - r811540;
        double r811542 = r811532 * r811541;
        double r811543 = r811538 + r811542;
        double r811544 = r811536 / r811543;
        double r811545 = r811530 / r811544;
        return r811545;
}

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.0
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 clear-num23.7

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

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

Reproduce

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