Average Error: 0.0 → 0.0
Time: 338.0ms
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 r244490 = x;
        double r244491 = y;
        double r244492 = r244490 + r244491;
        double r244493 = r244490 / r244492;
        return r244493;
}

double f(double x, double y) {
        double r244494 = x;
        double r244495 = y;
        double r244496 = r244494 + r244495;
        double r244497 = r244494 / r244496;
        return r244497;
}

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