Average Error: 0.2 → 0.2
Time: 12.8s
Precision: 64
\[\left(x \cdot 3\right) \cdot x\]
\[\left(x \cdot x\right) \cdot 3\]
\left(x \cdot 3\right) \cdot x
\left(x \cdot x\right) \cdot 3
double f(double x) {
        double r168231 = x;
        double r168232 = 3.0;
        double r168233 = r168231 * r168232;
        double r168234 = r168233 * r168231;
        return r168234;
}

double f(double x) {
        double r168235 = x;
        double r168236 = r168235 * r168235;
        double r168237 = 3.0;
        double r168238 = r168236 * r168237;
        return r168238;
}

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. Simplified0.2

    \[\leadsto \color{blue}{x \cdot \left(x \cdot 3\right)}\]
  3. Using strategy rm
  4. Applied *-un-lft-identity0.2

    \[\leadsto \color{blue}{\left(1 \cdot x\right)} \cdot \left(x \cdot 3\right)\]
  5. Applied associate-*l*0.2

    \[\leadsto \color{blue}{1 \cdot \left(x \cdot \left(x \cdot 3\right)\right)}\]
  6. Simplified0.2

    \[\leadsto 1 \cdot \color{blue}{\left(\left(x \cdot x\right) \cdot 3\right)}\]
  7. Final simplification0.2

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

Reproduce

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