Average Error: 0.0 → 0.0
Time: 3.0s
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 r5367340 = x;
        double r5367341 = r5367340 * r5367340;
        double r5367342 = r5367340 + r5367341;
        return r5367342;
}

double f(double x) {
        double r5367343 = x;
        double r5367344 = 1.0;
        double r5367345 = r5367344 + r5367343;
        double r5367346 = r5367343 * r5367345;
        return r5367346;
}

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