Average Error: 23.5 → 23.6
Time: 5.5s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{\left(y + b \cdot z\right) + z \cdot \left(-y\right)}\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\frac{x \cdot y + z \cdot \left(t - a\right)}{\left(y + b \cdot z\right) + z \cdot \left(-y\right)}
double f(double x, double y, double z, double t, double a, double b) {
        double r766586 = x;
        double r766587 = y;
        double r766588 = r766586 * r766587;
        double r766589 = z;
        double r766590 = t;
        double r766591 = a;
        double r766592 = r766590 - r766591;
        double r766593 = r766589 * r766592;
        double r766594 = r766588 + r766593;
        double r766595 = b;
        double r766596 = r766595 - r766587;
        double r766597 = r766589 * r766596;
        double r766598 = r766587 + r766597;
        double r766599 = r766594 / r766598;
        return r766599;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r766600 = x;
        double r766601 = y;
        double r766602 = r766600 * r766601;
        double r766603 = z;
        double r766604 = t;
        double r766605 = a;
        double r766606 = r766604 - r766605;
        double r766607 = r766603 * r766606;
        double r766608 = r766602 + r766607;
        double r766609 = b;
        double r766610 = r766609 * r766603;
        double r766611 = r766601 + r766610;
        double r766612 = -r766601;
        double r766613 = r766603 * r766612;
        double r766614 = r766611 + r766613;
        double r766615 = r766608 / r766614;
        return r766615;
}

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.1
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 sub-neg23.5

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

    \[\leadsto 1 \cdot \frac{x \cdot y + z \cdot \left(t - a\right)}{y + \color{blue}{\left(z \cdot b + z \cdot \left(-y\right)\right)}}\]
  15. Applied associate-+r+23.6

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

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

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

Reproduce

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