Average Error: 22.4 → 22.5
Time: 21.0s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{1}{\frac{y + \left(b - y\right) \cdot z}{\left(t - a\right) \cdot z + y \cdot x}}\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\frac{1}{\frac{y + \left(b - y\right) \cdot z}{\left(t - a\right) \cdot z + y \cdot x}}
double f(double x, double y, double z, double t, double a, double b) {
        double r34171000 = x;
        double r34171001 = y;
        double r34171002 = r34171000 * r34171001;
        double r34171003 = z;
        double r34171004 = t;
        double r34171005 = a;
        double r34171006 = r34171004 - r34171005;
        double r34171007 = r34171003 * r34171006;
        double r34171008 = r34171002 + r34171007;
        double r34171009 = b;
        double r34171010 = r34171009 - r34171001;
        double r34171011 = r34171003 * r34171010;
        double r34171012 = r34171001 + r34171011;
        double r34171013 = r34171008 / r34171012;
        return r34171013;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r34171014 = 1.0;
        double r34171015 = y;
        double r34171016 = b;
        double r34171017 = r34171016 - r34171015;
        double r34171018 = z;
        double r34171019 = r34171017 * r34171018;
        double r34171020 = r34171015 + r34171019;
        double r34171021 = t;
        double r34171022 = a;
        double r34171023 = r34171021 - r34171022;
        double r34171024 = r34171023 * r34171018;
        double r34171025 = x;
        double r34171026 = r34171015 * r34171025;
        double r34171027 = r34171024 + r34171026;
        double r34171028 = r34171020 / r34171027;
        double r34171029 = r34171014 / r34171028;
        return r34171029;
}

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.5
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 clear-num22.5

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

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

Reproduce

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