Average Error: 0 → 0
Time: 505.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 r260568 = x;
        double r260569 = y;
        double r260570 = r260568 + r260569;
        double r260571 = 2.0;
        double r260572 = r260570 / r260571;
        return r260572;
}

double f(double x, double y) {
        double r260573 = x;
        double r260574 = y;
        double r260575 = r260573 + r260574;
        double r260576 = 2.0;
        double r260577 = r260575 / r260576;
        return r260577;
}

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