Average Error: 0.0 → 0.0
Time: 9.6s
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 r11281283 = x;
        double r11281284 = y;
        double r11281285 = r11281283 + r11281284;
        double r11281286 = r11281283 / r11281285;
        return r11281286;
}

double f(double x, double y) {
        double r11281287 = x;
        double r11281288 = y;
        double r11281289 = r11281288 + r11281287;
        double r11281290 = r11281287 / r11281289;
        return r11281290;
}

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