Average Error: 0.0 → 0.0
Time: 2.8s
Precision: 64
\[x \cdot \left(x + 1\right)\]
\[x \cdot x + 1 \cdot x\]
x \cdot \left(x + 1\right)
x \cdot x + 1 \cdot x
double f(double x) {
        double r1516990 = x;
        double r1516991 = 1.0;
        double r1516992 = r1516990 + r1516991;
        double r1516993 = r1516990 * r1516992;
        return r1516993;
}

double f(double x) {
        double r1516994 = x;
        double r1516995 = r1516994 * r1516994;
        double r1516996 = 1.0;
        double r1516997 = r1516996 * r1516994;
        double r1516998 = r1516995 + r1516997;
        return r1516998;
}

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 \cdot \left(x + 1\right)\]
  2. Using strategy rm
  3. Applied distribute-rgt-in0.0

    \[\leadsto \color{blue}{x \cdot x + 1 \cdot x}\]
  4. Final simplification0.0

    \[\leadsto x \cdot x + 1 \cdot x\]

Reproduce

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