Average Error: 0 → 0
Time: 13.0s
Precision: 64
\[\frac{\left(\left(x + y\right) + z\right) + w}{4}\]
\[\frac{\left(\left(x + y\right) + z\right) + w}{4}\]
\frac{\left(\left(x + y\right) + z\right) + w}{4}
\frac{\left(\left(x + y\right) + z\right) + w}{4}
double f(double x, double y, double z, double w) {
        double r620353 = x;
        double r620354 = y;
        double r620355 = r620353 + r620354;
        double r620356 = z;
        double r620357 = r620355 + r620356;
        double r620358 = w;
        double r620359 = r620357 + r620358;
        double r620360 = 4.0;
        double r620361 = r620359 / r620360;
        return r620361;
}

double f(double x, double y, double z, double w) {
        double r620362 = x;
        double r620363 = y;
        double r620364 = r620362 + r620363;
        double r620365 = z;
        double r620366 = r620364 + r620365;
        double r620367 = w;
        double r620368 = r620366 + r620367;
        double r620369 = 4.0;
        double r620370 = r620368 / r620369;
        return r620370;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus w

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0

    \[\frac{\left(\left(x + y\right) + z\right) + w}{4}\]
  2. Final simplification0

    \[\leadsto \frac{\left(\left(x + y\right) + z\right) + w}{4}\]

Reproduce

herbie shell --seed 1 
(FPCore (x y z w)
  :name "(x + y + z + w)/4"
  :precision binary32
  (/ (+ (+ (+ x y) z) w) 4))