Average Error: 0 → 0
Time: 543.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 r122462 = x;
        double r122463 = y;
        double r122464 = r122462 + r122463;
        double r122465 = 2.0;
        double r122466 = r122464 / r122465;
        return r122466;
}

double f(double x, double y) {
        double r122467 = x;
        double r122468 = y;
        double r122469 = r122467 + r122468;
        double r122470 = 2.0;
        double r122471 = r122469 / r122470;
        return r122471;
}

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