Average Error: 0.2 → 0.2
Time: 12.0s
Precision: 64
\[\left(x \cdot 3.0\right) \cdot x\]
\[x \cdot \left(x \cdot 3.0\right)\]
\left(x \cdot 3.0\right) \cdot x
x \cdot \left(x \cdot 3.0\right)
double f(double x) {
        double r9353720 = x;
        double r9353721 = 3.0;
        double r9353722 = r9353720 * r9353721;
        double r9353723 = r9353722 * r9353720;
        return r9353723;
}

double f(double x) {
        double r9353724 = x;
        double r9353725 = 3.0;
        double r9353726 = r9353724 * r9353725;
        double r9353727 = r9353724 * r9353726;
        return r9353727;
}

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. Final simplification0.2

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

Reproduce

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