Average Error: 0 → 0
Time: 845.0ms
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 r10705658 = x;
        double r10705659 = y;
        double r10705660 = r10705658 + r10705659;
        double r10705661 = 2.0;
        double r10705662 = r10705660 / r10705661;
        return r10705662;
}

double f(double x, double y) {
        double r10705663 = y;
        double r10705664 = x;
        double r10705665 = r10705663 + r10705664;
        double r10705666 = 2.0;
        double r10705667 = r10705665 / r10705666;
        return r10705667;
}

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