Average Error: 0.0 → 0.0
Time: 696.0ms
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 r8187636 = x;
        double r8187637 = y;
        double r8187638 = r8187636 + r8187637;
        double r8187639 = r8187636 / r8187638;
        return r8187639;
}

double f(double x, double y) {
        double r8187640 = x;
        double r8187641 = y;
        double r8187642 = r8187641 + r8187640;
        double r8187643 = r8187640 / r8187642;
        return r8187643;
}

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