Average Error: 0.0 → 0.0
Time: 23.8s
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 r4989318 = x;
        double r4989319 = r4989318 * r4989318;
        double r4989320 = r4989318 + r4989319;
        return r4989320;
}

double f(double x) {
        double r4989321 = x;
        double r4989322 = 1.0;
        double r4989323 = r4989322 + r4989321;
        double r4989324 = r4989321 * r4989323;
        return r4989324;
}

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 2019172 
(FPCore (x)
  :name "Main:bigenough1 from B"
  (+ x (* x x)))