Average Error: 0.0 → 0.0
Time: 5.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 r11227271 = x;
        double r11227272 = y;
        double r11227273 = r11227271 + r11227272;
        double r11227274 = r11227271 / r11227273;
        return r11227274;
}

double f(double x, double y) {
        double r11227275 = x;
        double r11227276 = y;
        double r11227277 = r11227276 + r11227275;
        double r11227278 = r11227275 / r11227277;
        return r11227278;
}

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}{y + x}\]

Reproduce

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