Average Error: 0.2 → 0.2
Time: 8.7s
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 r772739 = x;
        double r772740 = 3.0;
        double r772741 = r772739 * r772740;
        double r772742 = r772741 * r772739;
        return r772742;
}

double f(double x) {
        double r772743 = 3.0;
        double r772744 = x;
        double r772745 = 2.0;
        double r772746 = pow(r772744, r772745);
        double r772747 = r772743 * r772746;
        return r772747;
}

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 
(FPCore (x)
  :name "Diagrams.Tangent:$catParam from diagrams-lib-1.3.0.3, F"
  :precision binary64
  (* (* x 3) x))