Average Error: 0.0 → 0.0
Time: 8.7s
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 r256599 = x;
        double r256600 = y;
        double r256601 = r256599 + r256600;
        double r256602 = r256599 / r256601;
        return r256602;
}

double f(double x, double y) {
        double r256603 = x;
        double r256604 = y;
        double r256605 = r256603 + r256604;
        double r256606 = r256603 / r256605;
        return r256606;
}

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