Average Error: 23.6 → 23.7
Time: 7.6s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{1}{\frac{y + z \cdot \left(b - y\right)}{x \cdot y + z \cdot \left(t - a\right)}}\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\frac{1}{\frac{y + z \cdot \left(b - y\right)}{x \cdot y + z \cdot \left(t - a\right)}}
double f(double x, double y, double z, double t, double a, double b) {
        double r889955 = x;
        double r889956 = y;
        double r889957 = r889955 * r889956;
        double r889958 = z;
        double r889959 = t;
        double r889960 = a;
        double r889961 = r889959 - r889960;
        double r889962 = r889958 * r889961;
        double r889963 = r889957 + r889962;
        double r889964 = b;
        double r889965 = r889964 - r889956;
        double r889966 = r889958 * r889965;
        double r889967 = r889956 + r889966;
        double r889968 = r889963 / r889967;
        return r889968;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r889969 = 1.0;
        double r889970 = y;
        double r889971 = z;
        double r889972 = b;
        double r889973 = r889972 - r889970;
        double r889974 = r889971 * r889973;
        double r889975 = r889970 + r889974;
        double r889976 = x;
        double r889977 = r889976 * r889970;
        double r889978 = t;
        double r889979 = a;
        double r889980 = r889978 - r889979;
        double r889981 = r889971 * r889980;
        double r889982 = r889977 + r889981;
        double r889983 = r889975 / r889982;
        double r889984 = r889969 / r889983;
        return r889984;
}

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.6
Target18.0
Herbie23.7
\[\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.6

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

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

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

Reproduce

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