Average Error: 0 → 0
Time: 1.0s
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 r10800771 = x;
        double r10800772 = y;
        double r10800773 = r10800771 + r10800772;
        double r10800774 = 2.0;
        double r10800775 = r10800773 / r10800774;
        return r10800775;
}

double f(double x, double y) {
        double r10800776 = y;
        double r10800777 = x;
        double r10800778 = r10800776 + r10800777;
        double r10800779 = 2.0;
        double r10800780 = r10800778 / r10800779;
        return r10800780;
}

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 2019174 +o rules:numerics
(FPCore (x y)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, A"
  (/ (+ x y) 2.0))