Average Error: 0.0 → 0.0
Time: 3.4s
Precision: 64
\[\frac{x}{x + y}\]
\[\frac{x}{y + x}\]
\frac{x}{x + y}
\frac{x}{y + x}
double f(double x, double y) {
        double r4079445 = x;
        double r4079446 = y;
        double r4079447 = r4079445 + r4079446;
        double r4079448 = r4079445 / r4079447;
        return r4079448;
}

double f(double x, double y) {
        double r4079449 = x;
        double r4079450 = y;
        double r4079451 = r4079450 + r4079449;
        double r4079452 = r4079449 / r4079451;
        return r4079452;
}

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

    \[\frac{x}{x + y}\]
  2. Final simplification0.0

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

Reproduce

herbie shell --seed 2019156 +o rules:numerics
(FPCore (x y)
  :name "AI.Clustering.Hierarchical.Internal:average from clustering-0.2.1, A"
  (/ x (+ x y)))