Average Error: 0 → 0
Time: 331.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 r234281 = x;
        double r234282 = y;
        double r234283 = r234281 + r234282;
        double r234284 = 2.0;
        double r234285 = r234283 / r234284;
        return r234285;
}

double f(double x, double y) {
        double r234286 = x;
        double r234287 = y;
        double r234288 = r234286 + r234287;
        double r234289 = 2.0;
        double r234290 = r234288 / r234289;
        return r234290;
}

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