Average Error: 23.1 → 23.3
Time: 7.4s
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 + \left(z \cdot t + z \cdot \left(-a\right)\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 + \left(z \cdot t + z \cdot \left(-a\right)\right)}}
double f(double x, double y, double z, double t, double a, double b) {
        double r839379 = x;
        double r839380 = y;
        double r839381 = r839379 * r839380;
        double r839382 = z;
        double r839383 = t;
        double r839384 = a;
        double r839385 = r839383 - r839384;
        double r839386 = r839382 * r839385;
        double r839387 = r839381 + r839386;
        double r839388 = b;
        double r839389 = r839388 - r839380;
        double r839390 = r839382 * r839389;
        double r839391 = r839380 + r839390;
        double r839392 = r839387 / r839391;
        return r839392;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r839393 = 1.0;
        double r839394 = y;
        double r839395 = z;
        double r839396 = b;
        double r839397 = r839396 - r839394;
        double r839398 = r839395 * r839397;
        double r839399 = r839394 + r839398;
        double r839400 = x;
        double r839401 = r839400 * r839394;
        double r839402 = t;
        double r839403 = r839395 * r839402;
        double r839404 = a;
        double r839405 = -r839404;
        double r839406 = r839395 * r839405;
        double r839407 = r839403 + r839406;
        double r839408 = r839401 + r839407;
        double r839409 = r839399 / r839408;
        double r839410 = r839393 / r839409;
        return r839410;
}

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.9
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.1

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

    \[\leadsto \color{blue}{\frac{1}{\frac{y + z \cdot \left(b - y\right)}{x \cdot y + z \cdot \left(t - a\right)}}}\]
  4. Using strategy rm
  5. Applied sub-neg23.3

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

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

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

Reproduce

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