Average Error: 0.0 → 0
Time: 922.0ms
Precision: 64
\[\frac{x + x}{x}\]
\[2\]
\frac{x + x}{x}
2
double f(double x) {
        double r54178115 = x;
        double r54178116 = r54178115 + r54178115;
        double r54178117 = r54178116 / r54178115;
        return r54178117;
}

double f(double __attribute__((unused)) x) {
        double r54178118 = 2.0;
        return r54178118;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\frac{x + x}{x}\]
  2. Simplified0

    \[\leadsto \color{blue}{2}\]
  3. Final simplification0

    \[\leadsto 2\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "(x + x) / x"
  (/ (+ x x) x))