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 r236612 = x;
        double r236613 = y;
        double r236614 = r236612 + r236613;
        double r236615 = 2.0;
        double r236616 = r236614 / r236615;
        return r236616;
}

double f(double x, double y) {
        double r236617 = x;
        double r236618 = y;
        double r236619 = r236617 + r236618;
        double r236620 = 2.0;
        double r236621 = r236619 / r236620;
        return r236621;
}

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