Average Error: 0.0 → 0.0
Time: 8.6s
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 r370785 = x;
        double r370786 = y;
        double r370787 = r370785 + r370786;
        double r370788 = r370785 / r370787;
        return r370788;
}

double f(double x, double y) {
        double r370789 = x;
        double r370790 = y;
        double r370791 = r370789 + r370790;
        double r370792 = r370789 / r370791;
        return r370792;
}

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