Average Error: 0.0 → 0.0
Time: 1.0s
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 r269326 = x;
        double r269327 = y;
        double r269328 = r269326 + r269327;
        double r269329 = r269326 / r269328;
        return r269329;
}

double f(double x, double y) {
        double r269330 = x;
        double r269331 = y;
        double r269332 = r269330 + r269331;
        double r269333 = r269330 / r269332;
        return r269333;
}

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