Average Error: 0 → 0
Time: 1.8s
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 r21380808 = x;
        double r21380809 = 2.0;
        double r21380810 = r21380808 * r21380809;
        double r21380811 = r21380810 * r21380808;
        return r21380811;
}

double f(double x) {
        double r21380812 = x;
        double r21380813 = 2.0;
        double r21380814 = r21380812 * r21380813;
        double r21380815 = r21380812 * r21380814;
        return r21380815;
}

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 2019168 
(FPCore (x)
  :name "Numeric.Log:$cexpm1 from log-domain-0.10.2.1, A"

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

  (* (* x 2.0) x))