Average Error: 22.9 → 22.9
Time: 24.7s
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 r447720 = x;
        double r447721 = y;
        double r447722 = r447720 * r447721;
        double r447723 = z;
        double r447724 = t;
        double r447725 = a;
        double r447726 = r447724 - r447725;
        double r447727 = r447723 * r447726;
        double r447728 = r447722 + r447727;
        double r447729 = b;
        double r447730 = r447729 - r447721;
        double r447731 = r447723 * r447730;
        double r447732 = r447721 + r447731;
        double r447733 = r447728 / r447732;
        return r447733;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r447734 = x;
        double r447735 = y;
        double r447736 = r447734 * r447735;
        double r447737 = z;
        double r447738 = t;
        double r447739 = a;
        double r447740 = r447738 - r447739;
        double r447741 = r447737 * r447740;
        double r447742 = r447736 + r447741;
        double r447743 = b;
        double r447744 = r447743 - r447735;
        double r447745 = r447737 * r447744;
        double r447746 = r447735 + r447745;
        double r447747 = r447742 / r447746;
        return r447747;
}

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.9
Target18.0
Herbie22.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 22.9

    \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
  2. Final simplification22.9

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

Reproduce

herbie shell --seed 2019325 +o rules:numerics
(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)))))