Average Error: 0.0 → 0.0
Time: 4.8s
Precision: 64
\[\frac{x}{x + y}\]
\[\frac{x}{y + x}\]
\frac{x}{x + y}
\frac{x}{y + x}
double f(double x, double y) {
        double r9400885 = x;
        double r9400886 = y;
        double r9400887 = r9400885 + r9400886;
        double r9400888 = r9400885 / r9400887;
        return r9400888;
}

double f(double x, double y) {
        double r9400889 = x;
        double r9400890 = y;
        double r9400891 = r9400890 + r9400889;
        double r9400892 = r9400889 / r9400891;
        return r9400892;
}

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}{y + x}\]

Reproduce

herbie shell --seed 2019172 +o rules:numerics
(FPCore (x y)
  :name "AI.Clustering.Hierarchical.Internal:average from clustering-0.2.1, A"
  (/ x (+ x y)))