Average Error: 0.0 → 0.0
Time: 1.9s
Precision: 64
\[\frac{x}{x + y}\]
\[\frac{x}{x + y}\]
\frac{x}{x + y}
\frac{x}{x + y}
double f(double x, double y) {
        double r283328 = x;
        double r283329 = y;
        double r283330 = r283328 + r283329;
        double r283331 = r283328 / r283330;
        return r283331;
}

double f(double x, double y) {
        double r283332 = x;
        double r283333 = y;
        double r283334 = r283332 + r283333;
        double r283335 = r283332 / r283334;
        return r283335;
}

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}{x + y}\]

Reproduce

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