Average Error: 0 → 0
Time: 336.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 r223198 = x;
        double r223199 = y;
        double r223200 = r223198 + r223199;
        double r223201 = 2.0;
        double r223202 = r223200 / r223201;
        return r223202;
}

double f(double x, double y) {
        double r223203 = x;
        double r223204 = y;
        double r223205 = r223203 + r223204;
        double r223206 = 2.0;
        double r223207 = r223205 / r223206;
        return r223207;
}

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