Average Error: 0 → 0
Time: 373.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 r310560 = x;
        double r310561 = y;
        double r310562 = r310560 + r310561;
        double r310563 = 2.0;
        double r310564 = r310562 / r310563;
        return r310564;
}

double f(double x, double y) {
        double r310565 = x;
        double r310566 = y;
        double r310567 = r310565 + r310566;
        double r310568 = 2.0;
        double r310569 = r310567 / r310568;
        return r310569;
}

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