Average Error: 0.0 → 0.0
Time: 7.8s
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 r131982 = x;
        double r131983 = y;
        double r131984 = r131982 + r131983;
        double r131985 = r131982 / r131984;
        return r131985;
}

double f(double x, double y) {
        double r131986 = x;
        double r131987 = y;
        double r131988 = r131986 + r131987;
        double r131989 = r131986 / r131988;
        return r131989;
}

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