Average Error: 0.0 → 0.0
Time: 24.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 r4718527 = x;
        double r4718528 = r4718527 * r4718527;
        double r4718529 = r4718527 + r4718528;
        return r4718529;
}

double f(double x) {
        double r4718530 = x;
        double r4718531 = 1.0;
        double r4718532 = r4718531 + r4718530;
        double r4718533 = r4718530 * r4718532;
        return r4718533;
}

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