Average Error: 0 → 0
Time: 344.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 r207398 = x;
        double r207399 = y;
        double r207400 = r207398 + r207399;
        double r207401 = 2.0;
        double r207402 = r207400 / r207401;
        return r207402;
}

double f(double x, double y) {
        double r207403 = x;
        double r207404 = y;
        double r207405 = r207403 + r207404;
        double r207406 = 2.0;
        double r207407 = r207405 / r207406;
        return r207407;
}

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))