Average Error: 0.0 → 0.0
Time: 3.6s
Precision: 64
\[x + x \cdot x\]
\[\left(x + 1\right) \cdot x\]
x + x \cdot x
\left(x + 1\right) \cdot x
double f(double x) {
        double r8652216 = x;
        double r8652217 = r8652216 * r8652216;
        double r8652218 = r8652216 + r8652217;
        return r8652218;
}

double f(double x) {
        double r8652219 = x;
        double r8652220 = 1.0;
        double r8652221 = r8652219 + r8652220;
        double r8652222 = r8652221 * r8652219;
        return r8652222;
}

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 \left(x + 1\right) \cdot x\]

Reproduce

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