Average Error: 22.6 → 22.6
Time: 5.8s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{x \cdot y + 1 \cdot \left(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{x \cdot y + 1 \cdot \left(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 r597202 = x;
        double r597203 = y;
        double r597204 = r597202 * r597203;
        double r597205 = z;
        double r597206 = t;
        double r597207 = a;
        double r597208 = r597206 - r597207;
        double r597209 = r597205 * r597208;
        double r597210 = r597204 + r597209;
        double r597211 = b;
        double r597212 = r597211 - r597203;
        double r597213 = r597205 * r597212;
        double r597214 = r597203 + r597213;
        double r597215 = r597210 / r597214;
        return r597215;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r597216 = x;
        double r597217 = y;
        double r597218 = r597216 * r597217;
        double r597219 = 1.0;
        double r597220 = z;
        double r597221 = t;
        double r597222 = a;
        double r597223 = r597221 - r597222;
        double r597224 = r597220 * r597223;
        double r597225 = r597219 * r597224;
        double r597226 = r597218 + r597225;
        double r597227 = b;
        double r597228 = r597227 - r597217;
        double r597229 = r597220 * r597228;
        double r597230 = r597217 + r597229;
        double r597231 = r597226 / r597230;
        return r597231;
}

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.6
Target17.1
Herbie22.6
\[\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.6

    \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity22.6

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

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

Reproduce

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