Average Error: 0.0 → 0.0
Time: 29.7s
Precision: 64
\[0 \le x \le 2\]
\[x \cdot \left(x \cdot x\right) + x \cdot x\]
\[x \cdot x + x \cdot \left(x \cdot x\right)\]
x \cdot \left(x \cdot x\right) + x \cdot x
x \cdot x + x \cdot \left(x \cdot x\right)
double f(double x) {
        double r22481641 = x;
        double r22481642 = r22481641 * r22481641;
        double r22481643 = r22481641 * r22481642;
        double r22481644 = r22481643 + r22481642;
        return r22481644;
}

double f(double x) {
        double r22481645 = x;
        double r22481646 = r22481645 * r22481645;
        double r22481647 = r22481645 * r22481646;
        double r22481648 = r22481646 + r22481647;
        return r22481648;
}

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. Final simplification0.0

    \[\leadsto x \cdot x + x \cdot \left(x \cdot x\right)\]

Reproduce

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

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

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