Average Error: 0 → 0
Time: 1.7s
Precision: 64
\[\left(x \cdot 2\right) \cdot x\]
\[x \cdot \left(2 \cdot x\right)\]
\left(x \cdot 2\right) \cdot x
x \cdot \left(2 \cdot x\right)
double f(double x) {
        double r13980497 = x;
        double r13980498 = 2.0;
        double r13980499 = r13980497 * r13980498;
        double r13980500 = r13980499 * r13980497;
        return r13980500;
}

double f(double x) {
        double r13980501 = x;
        double r13980502 = 2.0;
        double r13980503 = r13980502 * r13980501;
        double r13980504 = r13980501 * r13980503;
        return r13980504;
}

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(2 \cdot x\right)\]

Reproduce

herbie shell --seed 2019200 +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))