Average Error: 0.2 → 0.2
Time: 12.6s
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 r8571536 = x;
        double r8571537 = 3.0;
        double r8571538 = r8571536 * r8571537;
        double r8571539 = r8571538 * r8571536;
        return r8571539;
}

double f(double x) {
        double r8571540 = 3.0;
        double r8571541 = x;
        double r8571542 = r8571541 * r8571541;
        double r8571543 = r8571540 * r8571542;
        return r8571543;
}

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}{3.0 \cdot \left(x \cdot x\right)}\]
  4. Final simplification0.2

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

Reproduce

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