Average Error: 0.0 → 0.0
Time: 876.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 r205165 = x;
        double r205166 = y;
        double r205167 = r205165 + r205166;
        double r205168 = r205165 / r205167;
        return r205168;
}

double f(double x, double y) {
        double r205169 = x;
        double r205170 = y;
        double r205171 = r205169 + r205170;
        double r205172 = r205169 / r205171;
        return r205172;
}

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