Average Error: 0 → 0
Time: 325.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 r286822 = x;
        double r286823 = y;
        double r286824 = r286822 + r286823;
        double r286825 = 2.0;
        double r286826 = r286824 / r286825;
        return r286826;
}

double f(double x, double y) {
        double r286827 = x;
        double r286828 = y;
        double r286829 = r286827 + r286828;
        double r286830 = 2.0;
        double r286831 = r286829 / r286830;
        return r286831;
}

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