Average Error: 0 → 0
Time: 673.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 r122218 = x;
        double r122219 = y;
        double r122220 = r122218 + r122219;
        double r122221 = 2.0;
        double r122222 = r122220 / r122221;
        return r122222;
}

double f(double x, double y) {
        double r122223 = x;
        double r122224 = y;
        double r122225 = r122223 + r122224;
        double r122226 = 2.0;
        double r122227 = r122225 / r122226;
        return r122227;
}

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