Average Error: 0.0 → 0.0
Time: 1.2s
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 r271796 = x;
        double r271797 = y;
        double r271798 = r271796 + r271797;
        double r271799 = r271796 / r271798;
        return r271799;
}

double f(double x, double y) {
        double r271800 = x;
        double r271801 = y;
        double r271802 = r271800 + r271801;
        double r271803 = r271800 / r271802;
        return r271803;
}

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