Average Error: 0 → 0
Time: 921.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 r322458 = x;
        double r322459 = 2.0;
        double r322460 = r322458 * r322459;
        double r322461 = r322460 * r322458;
        return r322461;
}

double f(double x) {
        double r322462 = x;
        double r322463 = 2.0;
        double r322464 = r322462 * r322463;
        double r322465 = r322462 * r322464;
        return r322465;
}

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. Simplified0

    \[\leadsto \color{blue}{x \cdot \left(x \cdot 2\right)}\]
  3. Final simplification0

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

Reproduce

herbie shell --seed 2019179 
(FPCore (x)
  :name "Numeric.Log:$cexpm1 from log-domain-0.10.2.1, A"

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

  (* (* x 2.0) x))