Average Error: 0 → 0
Time: 748.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 r8417764 = x;
        double r8417765 = y;
        double r8417766 = r8417764 + r8417765;
        double r8417767 = 2.0;
        double r8417768 = r8417766 / r8417767;
        return r8417768;
}

double f(double x, double y) {
        double r8417769 = y;
        double r8417770 = x;
        double r8417771 = r8417769 + r8417770;
        double r8417772 = 2.0;
        double r8417773 = r8417771 / r8417772;
        return r8417773;
}

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