Average Error: 0.0 → 0.0
Time: 4.2s
Precision: 64
\[\frac{x}{x + y}\]
\[\frac{x}{y + x}\]
\frac{x}{x + y}
\frac{x}{y + x}
double f(double x, double y) {
        double r245241 = x;
        double r245242 = y;
        double r245243 = r245241 + r245242;
        double r245244 = r245241 / r245243;
        return r245244;
}

double f(double x, double y) {
        double r245245 = x;
        double r245246 = y;
        double r245247 = r245246 + r245245;
        double r245248 = r245245 / r245247;
        return r245248;
}

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. Simplified0.0

    \[\leadsto \color{blue}{\frac{x}{y + x}}\]
  3. Final simplification0.0

    \[\leadsto \frac{x}{y + x}\]

Reproduce

herbie shell --seed 2019195 
(FPCore (x y)
  :name "AI.Clustering.Hierarchical.Internal:average from clustering-0.2.1, A"
  (/ x (+ x y)))