Average Error: 22.4 → 22.5
Time: 6.9s
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)}{\left(t \cdot z + x \cdot y\right) - a \cdot z}}\]
\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)}{\left(t \cdot z + x \cdot y\right) - a \cdot z}}
double f(double x, double y, double z, double t, double a, double b) {
        double r966242 = x;
        double r966243 = y;
        double r966244 = r966242 * r966243;
        double r966245 = z;
        double r966246 = t;
        double r966247 = a;
        double r966248 = r966246 - r966247;
        double r966249 = r966245 * r966248;
        double r966250 = r966244 + r966249;
        double r966251 = b;
        double r966252 = r966251 - r966243;
        double r966253 = r966245 * r966252;
        double r966254 = r966243 + r966253;
        double r966255 = r966250 / r966254;
        return r966255;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r966256 = 1.0;
        double r966257 = y;
        double r966258 = z;
        double r966259 = b;
        double r966260 = r966259 - r966257;
        double r966261 = r966258 * r966260;
        double r966262 = r966257 + r966261;
        double r966263 = t;
        double r966264 = r966263 * r966258;
        double r966265 = x;
        double r966266 = r966265 * r966257;
        double r966267 = r966264 + r966266;
        double r966268 = a;
        double r966269 = r966268 * r966258;
        double r966270 = r966267 - r966269;
        double r966271 = r966262 / r966270;
        double r966272 = r966256 / r966271;
        return r966272;
}

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

Original22.4
Target17.4
Herbie22.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 22.4

    \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
  2. Using strategy rm
  3. Applied sub-neg22.4

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

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

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

    \[\leadsto \frac{\color{blue}{\left(x \cdot y + t \cdot z\right)} + z \cdot \left(-a\right)}{y + z \cdot \left(b - y\right)}\]
  7. Using strategy rm
  8. Applied clear-num22.5

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

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

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

Reproduce

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