Average Error: 0.2 → 0.2
Time: 9.9s
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 r11708246 = x;
        double r11708247 = 3.0;
        double r11708248 = r11708246 * r11708247;
        double r11708249 = r11708248 * r11708246;
        return r11708249;
}

double f(double x) {
        double r11708250 = 3.0;
        double r11708251 = x;
        double r11708252 = r11708251 * r11708251;
        double r11708253 = r11708250 * r11708252;
        return r11708253;
}

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))