Average Error: 0.0 → 0.0
Time: 756.0ms
Precision: 64
\[2 + \frac{1}{x}\]
\[2 + \frac{1}{x}\]
2 + \frac{1}{x}
2 + \frac{1}{x}
double f(double x) {
        double r1826363 = 2.0;
        double r1826364 = 1.0;
        double r1826365 = x;
        double r1826366 = r1826364 / r1826365;
        double r1826367 = r1826363 + r1826366;
        return r1826367;
}

double f(double x) {
        double r1826368 = 2.0;
        double r1826369 = 1.0;
        double r1826370 = x;
        double r1826371 = r1826369 / r1826370;
        double r1826372 = r1826368 + r1826371;
        return r1826372;
}

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

    \[2 + \frac{1}{x}\]
  2. Final simplification0.0

    \[\leadsto 2 + \frac{1}{x}\]

Reproduce

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