Average Error: 0 → 0
Time: 1.0s
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 r174370 = x;
        double r174371 = y;
        double r174372 = r174370 + r174371;
        double r174373 = 2.0;
        double r174374 = r174372 / r174373;
        return r174374;
}

double f(double x, double y) {
        double r174375 = x;
        double r174376 = y;
        double r174377 = r174375 + r174376;
        double r174378 = 2.0;
        double r174379 = r174377 / r174378;
        return r174379;
}

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