Average Error: 0.2 → 0.2
Time: 8.8s
Precision: 64
\[\left(x \cdot 3\right) \cdot x\]
\[x \cdot \left(x \cdot 3\right)\]
\left(x \cdot 3\right) \cdot x
x \cdot \left(x \cdot 3\right)
double f(double x) {
        double r8338172 = x;
        double r8338173 = 3.0;
        double r8338174 = r8338172 * r8338173;
        double r8338175 = r8338174 * r8338172;
        return r8338175;
}

double f(double x) {
        double r8338176 = x;
        double r8338177 = 3.0;
        double r8338178 = r8338176 * r8338177;
        double r8338179 = r8338176 * r8338178;
        return r8338179;
}

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

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

Reproduce

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