Average Error: 0 → 0
Time: 321.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 r278735 = x;
        double r278736 = y;
        double r278737 = r278735 + r278736;
        double r278738 = 2.0;
        double r278739 = r278737 / r278738;
        return r278739;
}

double f(double x, double y) {
        double r278740 = x;
        double r278741 = y;
        double r278742 = r278740 + r278741;
        double r278743 = 2.0;
        double r278744 = r278742 / r278743;
        return r278744;
}

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