Average Error: 23.5 → 23.5
Time: 22.2s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)}\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)}
double f(double x, double y, double z, double t, double a, double b) {
        double r39390564 = x;
        double r39390565 = y;
        double r39390566 = r39390564 * r39390565;
        double r39390567 = z;
        double r39390568 = t;
        double r39390569 = a;
        double r39390570 = r39390568 - r39390569;
        double r39390571 = r39390567 * r39390570;
        double r39390572 = r39390566 + r39390571;
        double r39390573 = b;
        double r39390574 = r39390573 - r39390565;
        double r39390575 = r39390567 * r39390574;
        double r39390576 = r39390565 + r39390575;
        double r39390577 = r39390572 / r39390576;
        return r39390577;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r39390578 = z;
        double r39390579 = t;
        double r39390580 = a;
        double r39390581 = r39390579 - r39390580;
        double r39390582 = r39390578 * r39390581;
        double r39390583 = x;
        double r39390584 = y;
        double r39390585 = r39390583 * r39390584;
        double r39390586 = r39390582 + r39390585;
        double r39390587 = b;
        double r39390588 = r39390587 - r39390584;
        double r39390589 = r39390578 * r39390588;
        double r39390590 = r39390584 + r39390589;
        double r39390591 = r39390586 / r39390590;
        return r39390591;
}

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.0
Herbie23.5
\[\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 div-inv23.7

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

herbie shell --seed 2019170 
(FPCore (x y z t a b)
  :name "Development.Shake.Progress:decay from shake-0.15.5"

  :herbie-target
  (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))

  (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))