Average Error: 0.0 → 0.0
Time: 27.7s
Precision: 64
\[x + x \cdot x\]
\[x \cdot \left(1 + x\right)\]
x + x \cdot x
x \cdot \left(1 + x\right)
double f(double x) {
        double r5397867 = x;
        double r5397868 = r5397867 * r5397867;
        double r5397869 = r5397867 + r5397868;
        return r5397869;
}

double f(double x) {
        double r5397870 = x;
        double r5397871 = 1.0;
        double r5397872 = r5397871 + r5397870;
        double r5397873 = r5397870 * r5397872;
        return r5397873;
}

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 + x \cdot x\]
  2. Using strategy rm
  3. Applied distribute-rgt1-in0.0

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

    \[\leadsto x \cdot \left(1 + x\right)\]

Reproduce

herbie shell --seed 2019170 
(FPCore (x)
  :name "Main:bigenough1 from B"
  (+ x (* x x)))