Average Error: 0 → 0
Time: 337.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 r208569 = x;
        double r208570 = y;
        double r208571 = r208569 + r208570;
        double r208572 = 2.0;
        double r208573 = r208571 / r208572;
        return r208573;
}

double f(double x, double y) {
        double r208574 = x;
        double r208575 = y;
        double r208576 = r208574 + r208575;
        double r208577 = 2.0;
        double r208578 = r208576 / r208577;
        return r208578;
}

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