Average Error: 0 → 0
Time: 313.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 r204158 = x;
        double r204159 = y;
        double r204160 = r204158 + r204159;
        double r204161 = 2.0;
        double r204162 = r204160 / r204161;
        return r204162;
}

double f(double x, double y) {
        double r204163 = x;
        double r204164 = y;
        double r204165 = r204163 + r204164;
        double r204166 = 2.0;
        double r204167 = r204165 / r204166;
        return r204167;
}

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