Average Error: 0.0 → 0.0
Time: 2.8s
Precision: 64
\[x \cdot \left(1 + x\right)\]
\[x \cdot 1 + x \cdot x\]
x \cdot \left(1 + x\right)
x \cdot 1 + x \cdot x
double f(double x) {
        double r1207610 = x;
        double r1207611 = 1.0;
        double r1207612 = r1207611 + r1207610;
        double r1207613 = r1207610 * r1207612;
        return r1207613;
}

double f(double x) {
        double r1207614 = x;
        double r1207615 = 1.0;
        double r1207616 = r1207614 * r1207615;
        double r1207617 = r1207614 * r1207614;
        double r1207618 = r1207616 + r1207617;
        return r1207618;
}

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

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

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

Reproduce

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