Average Error: 0 → 0
Time: 382.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 r235795 = x;
        double r235796 = y;
        double r235797 = r235795 + r235796;
        double r235798 = 2.0;
        double r235799 = r235797 / r235798;
        return r235799;
}

double f(double x, double y) {
        double r235800 = x;
        double r235801 = y;
        double r235802 = r235800 + r235801;
        double r235803 = 2.0;
        double r235804 = r235802 / r235803;
        return r235804;
}

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