Average Error: 0 → 0
Time: 882.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 r122672 = x;
        double r122673 = y;
        double r122674 = r122672 + r122673;
        double r122675 = 2.0;
        double r122676 = r122674 / r122675;
        return r122676;
}

double f(double x, double y) {
        double r122677 = y;
        double r122678 = x;
        double r122679 = r122677 + r122678;
        double r122680 = 2.0;
        double r122681 = r122679 / r122680;
        return r122681;
}

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