Average Error: 0 → 0
Time: 360.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 r285455 = x;
        double r285456 = y;
        double r285457 = r285455 + r285456;
        double r285458 = 2.0;
        double r285459 = r285457 / r285458;
        return r285459;
}

double f(double x, double y) {
        double r285460 = x;
        double r285461 = y;
        double r285462 = r285460 + r285461;
        double r285463 = 2.0;
        double r285464 = r285462 / r285463;
        return r285464;
}

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