Average Error: 23.1 → 23.2
Time: 23.9s
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 r25025769 = x;
        double r25025770 = y;
        double r25025771 = r25025769 * r25025770;
        double r25025772 = z;
        double r25025773 = t;
        double r25025774 = a;
        double r25025775 = r25025773 - r25025774;
        double r25025776 = r25025772 * r25025775;
        double r25025777 = r25025771 + r25025776;
        double r25025778 = b;
        double r25025779 = r25025778 - r25025770;
        double r25025780 = r25025772 * r25025779;
        double r25025781 = r25025770 + r25025780;
        double r25025782 = r25025777 / r25025781;
        return r25025782;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r25025783 = 1.0;
        double r25025784 = z;
        double r25025785 = b;
        double r25025786 = y;
        double r25025787 = r25025785 - r25025786;
        double r25025788 = r25025784 * r25025787;
        double r25025789 = r25025788 + r25025786;
        double r25025790 = r25025783 / r25025789;
        double r25025791 = t;
        double r25025792 = a;
        double r25025793 = r25025791 - r25025792;
        double r25025794 = r25025784 * r25025793;
        double r25025795 = x;
        double r25025796 = r25025795 * r25025786;
        double r25025797 = r25025794 + r25025796;
        double r25025798 = r25025790 * r25025797;
        return r25025798;
}

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

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

    \[\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 2019179 
(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)))))