Average Error: 21.8 → 21.9
Time: 20.6s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{1}{z \cdot \left(b - y\right) + y} \cdot \left(z \cdot \left(t - a\right) + x \cdot y\right)\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\frac{1}{z \cdot \left(b - y\right) + y} \cdot \left(z \cdot \left(t - a\right) + x \cdot y\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r37157043 = x;
        double r37157044 = y;
        double r37157045 = r37157043 * r37157044;
        double r37157046 = z;
        double r37157047 = t;
        double r37157048 = a;
        double r37157049 = r37157047 - r37157048;
        double r37157050 = r37157046 * r37157049;
        double r37157051 = r37157045 + r37157050;
        double r37157052 = b;
        double r37157053 = r37157052 - r37157044;
        double r37157054 = r37157046 * r37157053;
        double r37157055 = r37157044 + r37157054;
        double r37157056 = r37157051 / r37157055;
        return r37157056;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r37157057 = 1.0;
        double r37157058 = z;
        double r37157059 = b;
        double r37157060 = y;
        double r37157061 = r37157059 - r37157060;
        double r37157062 = r37157058 * r37157061;
        double r37157063 = r37157062 + r37157060;
        double r37157064 = r37157057 / r37157063;
        double r37157065 = t;
        double r37157066 = a;
        double r37157067 = r37157065 - r37157066;
        double r37157068 = r37157058 * r37157067;
        double r37157069 = x;
        double r37157070 = r37157069 * r37157060;
        double r37157071 = r37157068 + r37157070;
        double r37157072 = r37157064 * r37157071;
        return r37157072;
}

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

Original21.8
Target16.9
Herbie21.9
\[\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 21.8

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

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

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

Reproduce

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