Average Error: 0.0 → 0.0
Time: 5.5s
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 r13716502 = x;
        double r13716503 = y;
        double r13716504 = r13716502 + r13716503;
        double r13716505 = r13716502 / r13716504;
        return r13716505;
}

double f(double x, double y) {
        double r13716506 = x;
        double r13716507 = y;
        double r13716508 = r13716507 + r13716506;
        double r13716509 = r13716506 / r13716508;
        return r13716509;
}

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 2019170 +o rules:numerics
(FPCore (x y)
  :name "AI.Clustering.Hierarchical.Internal:average from clustering-0.2.1, A"
  (/ x (+ x y)))