Average Error: 0 → 0
Time: 323.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 r219109 = x;
        double r219110 = y;
        double r219111 = r219109 + r219110;
        double r219112 = 2.0;
        double r219113 = r219111 / r219112;
        return r219113;
}

double f(double x, double y) {
        double r219114 = x;
        double r219115 = y;
        double r219116 = r219114 + r219115;
        double r219117 = 2.0;
        double r219118 = r219116 / r219117;
        return r219118;
}

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))