Average Error: 23.0 → 23.0
Time: 17.6s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{x \cdot y + \left(t \cdot z + z \cdot \left(-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 + \left(t \cdot z + z \cdot \left(-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 r625955 = x;
        double r625956 = y;
        double r625957 = r625955 * r625956;
        double r625958 = z;
        double r625959 = t;
        double r625960 = a;
        double r625961 = r625959 - r625960;
        double r625962 = r625958 * r625961;
        double r625963 = r625957 + r625962;
        double r625964 = b;
        double r625965 = r625964 - r625956;
        double r625966 = r625958 * r625965;
        double r625967 = r625956 + r625966;
        double r625968 = r625963 / r625967;
        return r625968;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r625969 = x;
        double r625970 = y;
        double r625971 = r625969 * r625970;
        double r625972 = t;
        double r625973 = z;
        double r625974 = r625972 * r625973;
        double r625975 = a;
        double r625976 = -r625975;
        double r625977 = r625973 * r625976;
        double r625978 = r625974 + r625977;
        double r625979 = r625971 + r625978;
        double r625980 = b;
        double r625981 = r625980 - r625970;
        double r625982 = r625973 * r625981;
        double r625983 = r625970 + r625982;
        double r625984 = r625979 / r625983;
        return r625984;
}

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.0
Target17.8
Herbie23.0
\[\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.0

    \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
  2. Using strategy rm
  3. Applied sub-neg23.0

    \[\leadsto \frac{x \cdot y + z \cdot \color{blue}{\left(t + \left(-a\right)\right)}}{y + z \cdot \left(b - y\right)}\]
  4. Applied distribute-lft-in23.0

    \[\leadsto \frac{x \cdot y + \color{blue}{\left(z \cdot t + z \cdot \left(-a\right)\right)}}{y + z \cdot \left(b - y\right)}\]
  5. Simplified23.0

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

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

Reproduce

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