Average Error: 0.0 → 0.0
Time: 6.7s
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 r10265190 = x;
        double r10265191 = y;
        double r10265192 = r10265190 + r10265191;
        double r10265193 = r10265190 / r10265192;
        return r10265193;
}

double f(double x, double y) {
        double r10265194 = x;
        double r10265195 = y;
        double r10265196 = r10265195 + r10265194;
        double r10265197 = r10265194 / r10265196;
        return r10265197;
}

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