Average Error: 0.0 → 0.0
Time: 4.5s
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 r230416 = x;
        double r230417 = y;
        double r230418 = r230416 + r230417;
        double r230419 = r230416 / r230418;
        return r230419;
}

double f(double x, double y) {
        double r230420 = x;
        double r230421 = y;
        double r230422 = r230420 + r230421;
        double r230423 = r230420 / r230422;
        return r230423;
}

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