Average Error: 0.0 → 0.0
Time: 23.7s
Precision: 64
\[0 \le x \le 2\]
\[x \cdot \left(x \cdot x\right) + x \cdot x\]
\[x \cdot x + {x}^{3}\]
x \cdot \left(x \cdot x\right) + x \cdot x
x \cdot x + {x}^{3}
double f(double x) {
        double r7523513 = x;
        double r7523514 = r7523513 * r7523513;
        double r7523515 = r7523513 * r7523514;
        double r7523516 = r7523515 + r7523514;
        return r7523516;
}

double f(double x) {
        double r7523517 = x;
        double r7523518 = r7523517 * r7523517;
        double r7523519 = 3.0;
        double r7523520 = pow(r7523517, r7523519);
        double r7523521 = r7523518 + r7523520;
        return r7523521;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[\left(\left(1.0 + x\right) \cdot x\right) \cdot x\]

Derivation

  1. Initial program 0.0

    \[x \cdot \left(x \cdot x\right) + x \cdot x\]
  2. Using strategy rm
  3. Applied pow10.0

    \[\leadsto x \cdot \left(x \cdot \color{blue}{{x}^{1}}\right) + x \cdot x\]
  4. Applied pow10.0

    \[\leadsto x \cdot \left(\color{blue}{{x}^{1}} \cdot {x}^{1}\right) + x \cdot x\]
  5. Applied pow-prod-up0.0

    \[\leadsto x \cdot \color{blue}{{x}^{\left(1 + 1\right)}} + x \cdot x\]
  6. Applied pow10.0

    \[\leadsto \color{blue}{{x}^{1}} \cdot {x}^{\left(1 + 1\right)} + x \cdot x\]
  7. Applied pow-prod-up0.0

    \[\leadsto \color{blue}{{x}^{\left(1 + \left(1 + 1\right)\right)}} + x \cdot x\]
  8. Simplified0.0

    \[\leadsto {x}^{\color{blue}{3}} + x \cdot x\]
  9. Final simplification0.0

    \[\leadsto x \cdot x + {x}^{3}\]

Reproduce

herbie shell --seed 2019121 
(FPCore (x)
  :name "Expression 3, p15"
  :pre (<= 0 x 2)

  :herbie-target
  (* (* (+ 1.0 x) x) x)

  (+ (* x (* x x)) (* x x)))