Average Error: 23.3 → 23.4
Time: 7.2s
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 r881489 = x;
        double r881490 = y;
        double r881491 = r881489 * r881490;
        double r881492 = z;
        double r881493 = t;
        double r881494 = a;
        double r881495 = r881493 - r881494;
        double r881496 = r881492 * r881495;
        double r881497 = r881491 + r881496;
        double r881498 = b;
        double r881499 = r881498 - r881490;
        double r881500 = r881492 * r881499;
        double r881501 = r881490 + r881500;
        double r881502 = r881497 / r881501;
        return r881502;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r881503 = 1.0;
        double r881504 = y;
        double r881505 = z;
        double r881506 = b;
        double r881507 = r881506 - r881504;
        double r881508 = r881505 * r881507;
        double r881509 = r881504 + r881508;
        double r881510 = x;
        double r881511 = r881510 * r881504;
        double r881512 = t;
        double r881513 = a;
        double r881514 = r881512 - r881513;
        double r881515 = r881505 * r881514;
        double r881516 = r881511 + r881515;
        double r881517 = r881509 / r881516;
        double r881518 = r881503 / r881517;
        return r881518;
}

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

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

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

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

Reproduce

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