Average Error: 23.0 → 23.0
Time: 7.5s
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 r775966 = x;
        double r775967 = y;
        double r775968 = r775966 * r775967;
        double r775969 = z;
        double r775970 = t;
        double r775971 = a;
        double r775972 = r775970 - r775971;
        double r775973 = r775969 * r775972;
        double r775974 = r775968 + r775973;
        double r775975 = b;
        double r775976 = r775975 - r775967;
        double r775977 = r775969 * r775976;
        double r775978 = r775967 + r775977;
        double r775979 = r775974 / r775978;
        return r775979;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r775980 = x;
        double r775981 = y;
        double r775982 = r775980 * r775981;
        double r775983 = z;
        double r775984 = t;
        double r775985 = a;
        double r775986 = r775984 - r775985;
        double r775987 = r775983 * r775986;
        double r775988 = r775982 + r775987;
        double r775989 = b;
        double r775990 = r775989 - r775981;
        double r775991 = r775983 * r775990;
        double r775992 = r775981 + r775991;
        double r775993 = r775988 / r775992;
        return r775993;
}

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.7
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. Final simplification23.0

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

Reproduce

herbie shell --seed 2020089 +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)))))