Average Error: 0.2 → 0.2
Time: 8.8s
Precision: 64
\[\left(x \cdot 3.0\right) \cdot x\]
\[3.0 \cdot \left(x \cdot x\right)\]
\left(x \cdot 3.0\right) \cdot x
3.0 \cdot \left(x \cdot x\right)
double f(double x) {
        double r8599422 = x;
        double r8599423 = 3.0;
        double r8599424 = r8599422 * r8599423;
        double r8599425 = r8599424 * r8599422;
        return r8599425;
}

double f(double x) {
        double r8599426 = 3.0;
        double r8599427 = x;
        double r8599428 = r8599427 * r8599427;
        double r8599429 = r8599426 * r8599428;
        return r8599429;
}

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.0\right) \cdot x\]
  2. Taylor expanded around 0 0.2

    \[\leadsto \color{blue}{3.0 \cdot {x}^{2}}\]
  3. Simplified0.2

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

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

Reproduce

herbie shell --seed 2019163 
(FPCore (x)
  :name "Diagrams.Tangent:$catParam from diagrams-lib-1.3.0.3, F"
  (* (* x 3.0) x))