Average Error: 0.0 → 0.0
Time: 11.5s
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 r265007 = x;
        double r265008 = y;
        double r265009 = r265007 + r265008;
        double r265010 = r265007 / r265009;
        return r265010;
}

double f(double x, double y) {
        double r265011 = x;
        double r265012 = y;
        double r265013 = r265011 + r265012;
        double r265014 = r265011 / r265013;
        return r265014;
}

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