Average Error: 0 → 0
Time: 841.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 r193871 = x;
        double r193872 = y;
        double r193873 = r193871 + r193872;
        double r193874 = 2.0;
        double r193875 = r193873 / r193874;
        return r193875;
}

double f(double x, double y) {
        double r193876 = x;
        double r193877 = y;
        double r193878 = r193876 + r193877;
        double r193879 = 2.0;
        double r193880 = r193878 / r193879;
        return r193880;
}

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. Simplified0

    \[\leadsto \color{blue}{\frac{y + x}{2}}\]
  3. Final simplification0

    \[\leadsto \frac{x + y}{2}\]

Reproduce

herbie shell --seed 2019194 
(FPCore (x y)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, A"
  (/ (+ x y) 2.0))