Average Error: 0.0 → 0.0
Time: 1.9s
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 r319014 = x;
        double r319015 = y;
        double r319016 = r319014 + r319015;
        double r319017 = r319014 / r319016;
        return r319017;
}

double f(double x, double y) {
        double r319018 = x;
        double r319019 = y;
        double r319020 = r319018 + r319019;
        double r319021 = r319018 / r319020;
        return r319021;
}

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