Average Error: 0.0 → 0.0
Time: 18.2s
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 r10543906 = x;
        double r10543907 = y;
        double r10543908 = r10543906 + r10543907;
        double r10543909 = r10543906 / r10543908;
        return r10543909;
}

double f(double x, double y) {
        double r10543910 = x;
        double r10543911 = y;
        double r10543912 = r10543911 + r10543910;
        double r10543913 = r10543910 / r10543912;
        return r10543913;
}

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