Average Error: 0 → 0
Time: 983.0ms
Precision: 64
\[\left(x \cdot 2.0\right) \cdot x\]
\[x \cdot \left(x \cdot 2.0\right)\]
\left(x \cdot 2.0\right) \cdot x
x \cdot \left(x \cdot 2.0\right)
double f(double x) {
        double r18919657 = x;
        double r18919658 = 2.0;
        double r18919659 = r18919657 * r18919658;
        double r18919660 = r18919659 * r18919657;
        return r18919660;
}

double f(double x) {
        double r18919661 = x;
        double r18919662 = 2.0;
        double r18919663 = r18919661 * r18919662;
        double r18919664 = r18919661 * r18919663;
        return r18919664;
}

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.0 \cdot x\right) \cdot x\]

Derivation

  1. Initial program 0

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

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

Reproduce

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