Average Error: 0.2 → 0.2
Time: 9.6s
Precision: 64
\[\left(x \cdot 3\right) \cdot x\]
\[3 \cdot {x}^{2}\]
\left(x \cdot 3\right) \cdot x
3 \cdot {x}^{2}
double f(double x) {
        double r148979 = x;
        double r148980 = 3.0;
        double r148981 = r148979 * r148980;
        double r148982 = r148981 * r148979;
        return r148982;
}

double f(double x) {
        double r148983 = 3.0;
        double r148984 = x;
        double r148985 = 2.0;
        double r148986 = pow(r148984, r148985);
        double r148987 = r148983 * r148986;
        return r148987;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.2

    \[\left(x \cdot 3\right) \cdot x\]
  2. Taylor expanded around 0 0.2

    \[\leadsto \color{blue}{3 \cdot {x}^{2}}\]
  3. Final simplification0.2

    \[\leadsto 3 \cdot {x}^{2}\]

Reproduce

herbie shell --seed 2019209 +o rules:numerics
(FPCore (x)
  :name "Diagrams.Tangent:$catParam from diagrams-lib-1.3.0.3, F"
  :precision binary64
  (* (* x 3) x))