Average Error: 23.5 → 23.6
Time: 5.8s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\left(x \cdot y + z \cdot \left(t - a\right)\right) \cdot \frac{1}{y + z \cdot \left(b - y\right)}\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\left(x \cdot y + z \cdot \left(t - a\right)\right) \cdot \frac{1}{y + z \cdot \left(b - y\right)}
double f(double x, double y, double z, double t, double a, double b) {
        double r1306610 = x;
        double r1306611 = y;
        double r1306612 = r1306610 * r1306611;
        double r1306613 = z;
        double r1306614 = t;
        double r1306615 = a;
        double r1306616 = r1306614 - r1306615;
        double r1306617 = r1306613 * r1306616;
        double r1306618 = r1306612 + r1306617;
        double r1306619 = b;
        double r1306620 = r1306619 - r1306611;
        double r1306621 = r1306613 * r1306620;
        double r1306622 = r1306611 + r1306621;
        double r1306623 = r1306618 / r1306622;
        return r1306623;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r1306624 = x;
        double r1306625 = y;
        double r1306626 = r1306624 * r1306625;
        double r1306627 = z;
        double r1306628 = t;
        double r1306629 = a;
        double r1306630 = r1306628 - r1306629;
        double r1306631 = r1306627 * r1306630;
        double r1306632 = r1306626 + r1306631;
        double r1306633 = 1.0;
        double r1306634 = b;
        double r1306635 = r1306634 - r1306625;
        double r1306636 = r1306627 * r1306635;
        double r1306637 = r1306625 + r1306636;
        double r1306638 = r1306633 / r1306637;
        double r1306639 = r1306632 * r1306638;
        return r1306639;
}

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.5
Target18.2
Herbie23.6
\[\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.5

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

    \[\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 *-un-lft-identity23.6

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

    \[\leadsto \frac{1}{\frac{\color{blue}{1 \cdot \left(y + z \cdot \left(b - y\right)\right)}}{1 \cdot \left(x \cdot y + z \cdot \left(t - a\right)\right)}}\]
  7. Applied times-frac23.6

    \[\leadsto \frac{1}{\color{blue}{\frac{1}{1} \cdot \frac{y + z \cdot \left(b - y\right)}{x \cdot y + z \cdot \left(t - a\right)}}}\]
  8. Applied add-cube-cbrt23.6

    \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{\frac{1}{1} \cdot \frac{y + z \cdot \left(b - y\right)}{x \cdot y + z \cdot \left(t - a\right)}}\]
  9. Applied times-frac23.6

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

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

    \[\leadsto 1 \cdot \color{blue}{\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}}\]
  12. Using strategy rm
  13. Applied div-inv23.6

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

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

Reproduce

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