Average Error: 23.8 → 23.9
Time: 7.0s
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 r759574 = x;
        double r759575 = y;
        double r759576 = r759574 * r759575;
        double r759577 = z;
        double r759578 = t;
        double r759579 = a;
        double r759580 = r759578 - r759579;
        double r759581 = r759577 * r759580;
        double r759582 = r759576 + r759581;
        double r759583 = b;
        double r759584 = r759583 - r759575;
        double r759585 = r759577 * r759584;
        double r759586 = r759575 + r759585;
        double r759587 = r759582 / r759586;
        return r759587;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r759588 = 1.0;
        double r759589 = y;
        double r759590 = z;
        double r759591 = b;
        double r759592 = r759591 - r759589;
        double r759593 = r759590 * r759592;
        double r759594 = r759589 + r759593;
        double r759595 = x;
        double r759596 = r759595 * r759589;
        double r759597 = t;
        double r759598 = a;
        double r759599 = r759597 - r759598;
        double r759600 = r759590 * r759599;
        double r759601 = r759596 + r759600;
        double r759602 = r759594 / r759601;
        double r759603 = r759588 / r759602;
        return r759603;
}

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.8
Target18.6
Herbie23.9
\[\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.8

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

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

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

Reproduce

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