Average Error: 0 → 0
Time: 612.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 r19824 = x;
        double r19825 = y;
        double r19826 = r19824 + r19825;
        double r19827 = 2.0;
        double r19828 = r19826 / r19827;
        return r19828;
}

double f(double x, double y) {
        double r19829 = x;
        double r19830 = y;
        double r19831 = r19829 + r19830;
        double r19832 = 2.0;
        double r19833 = r19831 / r19832;
        return r19833;
}

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