Average Error: 0.0 → 0.0
Time: 9.9s
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 r9768478 = x;
        double r9768479 = y;
        double r9768480 = r9768478 + r9768479;
        double r9768481 = r9768478 / r9768480;
        return r9768481;
}

double f(double x, double y) {
        double r9768482 = x;
        double r9768483 = y;
        double r9768484 = r9768483 + r9768482;
        double r9768485 = r9768482 / r9768484;
        return r9768485;
}

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