Average Error: 0 → 0
Time: 328.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 r40392 = x;
        double r40393 = y;
        double r40394 = r40392 + r40393;
        double r40395 = 2.0;
        double r40396 = r40394 / r40395;
        return r40396;
}

double f(double x, double y) {
        double r40397 = x;
        double r40398 = y;
        double r40399 = r40397 + r40398;
        double r40400 = 2.0;
        double r40401 = r40399 / r40400;
        return r40401;
}

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