Average Error: 0.0 → 0.0
Time: 862.0ms
Precision: 64
\[\frac{1}{x} + 2 \cdot x\]
\[\frac{1}{x} + 2 \cdot x\]
\frac{1}{x} + 2 \cdot x
\frac{1}{x} + 2 \cdot x
double f(double x) {
        double r1482465 = 1.0;
        double r1482466 = x;
        double r1482467 = r1482465 / r1482466;
        double r1482468 = 2.0;
        double r1482469 = r1482468 * r1482466;
        double r1482470 = r1482467 + r1482469;
        return r1482470;
}

double f(double x) {
        double r1482471 = 1.0;
        double r1482472 = x;
        double r1482473 = r1482471 / r1482472;
        double r1482474 = 2.0;
        double r1482475 = r1482474 * r1482472;
        double r1482476 = r1482473 + r1482475;
        return r1482476;
}

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{1}{x} + 2 \cdot x\]
  2. Final simplification0.0

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

Reproduce

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