Average Error: 0.0 → 0.0
Time: 2.6s
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 r115774 = x;
        double r115775 = r115774 * r115774;
        double r115776 = r115774 + r115775;
        return r115776;
}

double f(double x) {
        double r115777 = x;
        double r115778 = 1.0;
        double r115779 = r115778 + r115777;
        double r115780 = r115777 * r115779;
        return r115780;
}

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