Average Error: 0 → 0
Time: 813.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 r162011 = x;
        double r162012 = y;
        double r162013 = r162011 + r162012;
        double r162014 = 2.0;
        double r162015 = r162013 / r162014;
        return r162015;
}

double f(double x, double y) {
        double r162016 = x;
        double r162017 = y;
        double r162018 = r162016 + r162017;
        double r162019 = 2.0;
        double r162020 = r162018 / r162019;
        return r162020;
}

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