Average Error: 0 → 0
Time: 910.0ms
Precision: 64
\[\left(x \cdot 2\right) \cdot x\]
\[x \cdot \left(x \cdot 2\right)\]
\left(x \cdot 2\right) \cdot x
x \cdot \left(x \cdot 2\right)
double f(double x) {
        double r340710 = x;
        double r340711 = 2.0;
        double r340712 = r340710 * r340711;
        double r340713 = r340712 * r340710;
        return r340713;
}

double f(double x) {
        double r340714 = x;
        double r340715 = 2.0;
        double r340716 = r340714 * r340715;
        double r340717 = r340714 * r340716;
        return r340717;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0
Target0
Herbie0
\[\left(2 \cdot x\right) \cdot x\]

Derivation

  1. Initial program 0

    \[\left(x \cdot 2\right) \cdot x\]
  2. Final simplification0

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

Reproduce

herbie shell --seed 2019196 +o rules:numerics
(FPCore (x)
  :name "Numeric.Log:$cexpm1 from log-domain-0.10.2.1, A"

  :herbie-target
  (* (* 2.0 x) x)

  (* (* x 2.0) x))