Average Error: 0 → 0
Time: 347.0ms
Precision: 64
\[\frac{x + y}{2}\]
\[\frac{x + y}{2}\]
\frac{x + y}{2}
\frac{x + y}{2}
double f(double x, double y) {
        double r216744 = x;
        double r216745 = y;
        double r216746 = r216744 + r216745;
        double r216747 = 2.0;
        double r216748 = r216746 / r216747;
        return r216748;
}

double f(double x, double y) {
        double r216749 = x;
        double r216750 = y;
        double r216751 = r216749 + r216750;
        double r216752 = 2.0;
        double r216753 = r216751 / r216752;
        return r216753;
}

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{x + y}{2}\]

Reproduce

herbie shell --seed 2020047 +o rules:numerics
(FPCore (x y)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, A"
  :precision binary64
  (/ (+ x y) 2))