Average Error: 0 → 0
Time: 877.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 r426645 = x;
        double r426646 = 2.0;
        double r426647 = r426645 * r426646;
        double r426648 = r426647 * r426645;
        return r426648;
}

double f(double x) {
        double r426649 = x;
        double r426650 = 2.0;
        double r426651 = r426649 * r426650;
        double r426652 = r426649 * r426651;
        return r426652;
}

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 2019194 +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))