Average Error: 0.0 → 0.0
Time: 2.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 r1266 = x;
        double r1267 = y;
        double r1268 = r1266 + r1267;
        double r1269 = r1266 / r1268;
        return r1269;
}

double f(double x, double y) {
        double r1270 = x;
        double r1271 = y;
        double r1272 = r1270 + r1271;
        double r1273 = r1270 / r1272;
        return r1273;
}

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