Average Error: 23.2 → 23.2
Time: 8.0s
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 r945222 = x;
        double r945223 = y;
        double r945224 = r945222 * r945223;
        double r945225 = z;
        double r945226 = t;
        double r945227 = a;
        double r945228 = r945226 - r945227;
        double r945229 = r945225 * r945228;
        double r945230 = r945224 + r945229;
        double r945231 = b;
        double r945232 = r945231 - r945223;
        double r945233 = r945225 * r945232;
        double r945234 = r945223 + r945233;
        double r945235 = r945230 / r945234;
        return r945235;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r945236 = x;
        double r945237 = y;
        double r945238 = r945236 * r945237;
        double r945239 = z;
        double r945240 = t;
        double r945241 = a;
        double r945242 = r945240 - r945241;
        double r945243 = r945239 * r945242;
        double r945244 = r945238 + r945243;
        double r945245 = b;
        double r945246 = r945245 - r945237;
        double r945247 = r945239 * r945246;
        double r945248 = r945237 + r945247;
        double r945249 = r945244 / r945248;
        return r945249;
}

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.2
Target18.1
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.2

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

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

Reproduce

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