Average Error: 0.0 → 0.0
Time: 2.4s
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 r219565 = x;
        double r219566 = y;
        double r219567 = r219565 + r219566;
        double r219568 = r219565 / r219567;
        return r219568;
}

double f(double x, double y) {
        double r219569 = x;
        double r219570 = y;
        double r219571 = r219569 + r219570;
        double r219572 = r219569 / r219571;
        return r219572;
}

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