Average Error: 0.0 → 0.0
Time: 726.0ms
Precision: 64
\[x + \frac{1}{x}\]
\[x + \frac{1}{x}\]
x + \frac{1}{x}
x + \frac{1}{x}
double f(double x) {
        double r699304 = x;
        double r699305 = 1.0;
        double r699306 = r699305 / r699304;
        double r699307 = r699304 + r699306;
        return r699307;
}

double f(double x) {
        double r699308 = x;
        double r699309 = 1.0;
        double r699310 = r699309 / r699308;
        double r699311 = r699308 + r699310;
        return r699311;
}

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

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

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

Reproduce

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