Average Error: 0 → 0
Time: 1.1s
Precision: 64
\[\frac{x + y}{2}\]
\[\frac{y + x}{2}\]
\frac{x + y}{2}
\frac{y + x}{2}
double f(double x, double y) {
        double r15003139 = x;
        double r15003140 = y;
        double r15003141 = r15003139 + r15003140;
        double r15003142 = 2.0;
        double r15003143 = r15003141 / r15003142;
        return r15003143;
}

double f(double x, double y) {
        double r15003144 = y;
        double r15003145 = x;
        double r15003146 = r15003144 + r15003145;
        double r15003147 = 2.0;
        double r15003148 = r15003146 / r15003147;
        return r15003148;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0

    \[\frac{x + y}{2}\]
  2. Final simplification0

    \[\leadsto \frac{y + x}{2}\]

Reproduce

herbie shell --seed 2019179 
(FPCore (x y)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, A"
  (/ (+ x y) 2.0))