Average Error: 23.1 → 23.1
Time: 17.0s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\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 + z \cdot \left(t - a\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)}
double f(double x, double y, double z, double t, double a, double b) {
        double r533184 = x;
        double r533185 = y;
        double r533186 = r533184 * r533185;
        double r533187 = z;
        double r533188 = t;
        double r533189 = a;
        double r533190 = r533188 - r533189;
        double r533191 = r533187 * r533190;
        double r533192 = r533186 + r533191;
        double r533193 = b;
        double r533194 = r533193 - r533185;
        double r533195 = r533187 * r533194;
        double r533196 = r533185 + r533195;
        double r533197 = r533192 / r533196;
        return r533197;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r533198 = x;
        double r533199 = y;
        double r533200 = r533198 * r533199;
        double r533201 = z;
        double r533202 = t;
        double r533203 = a;
        double r533204 = r533202 - r533203;
        double r533205 = r533201 * r533204;
        double r533206 = r533200 + r533205;
        double r533207 = b;
        double r533208 = r533207 - r533199;
        double r533209 = r533201 * r533208;
        double r533210 = r533199 + r533209;
        double r533211 = r533206 / r533210;
        return r533211;
}

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.1
Target17.9
Herbie23.1
\[\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.1

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

    \[\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 clear-num23.2

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

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

Reproduce

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