Average Error: 23.7 → 23.7
Time: 14.5s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{1 \cdot \left(x \cdot y + z \cdot \left(t - a\right)\right)}{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{1 \cdot \left(x \cdot y + z \cdot \left(t - a\right)\right)}{y + z \cdot \left(b - y\right)}
double f(double x, double y, double z, double t, double a, double b) {
        double r477030 = x;
        double r477031 = y;
        double r477032 = r477030 * r477031;
        double r477033 = z;
        double r477034 = t;
        double r477035 = a;
        double r477036 = r477034 - r477035;
        double r477037 = r477033 * r477036;
        double r477038 = r477032 + r477037;
        double r477039 = b;
        double r477040 = r477039 - r477031;
        double r477041 = r477033 * r477040;
        double r477042 = r477031 + r477041;
        double r477043 = r477038 / r477042;
        return r477043;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r477044 = 1.0;
        double r477045 = x;
        double r477046 = y;
        double r477047 = r477045 * r477046;
        double r477048 = z;
        double r477049 = t;
        double r477050 = a;
        double r477051 = r477049 - r477050;
        double r477052 = r477048 * r477051;
        double r477053 = r477047 + r477052;
        double r477054 = r477044 * r477053;
        double r477055 = b;
        double r477056 = r477055 - r477046;
        double r477057 = r477048 * r477056;
        double r477058 = r477046 + r477057;
        double r477059 = r477054 / r477058;
        return r477059;
}

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

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

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

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

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

    \[\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-sqr-sqrt23.8

    \[\leadsto \frac{\color{blue}{\sqrt{1} \cdot \sqrt{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.8

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

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

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

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

Reproduce

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