Average Error: 0.2 → 0.2
Time: 11.0s
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 r10903007 = x;
        double r10903008 = 3.0;
        double r10903009 = r10903007 * r10903008;
        double r10903010 = r10903009 * r10903007;
        return r10903010;
}

double f(double x) {
        double r10903011 = 3.0;
        double r10903012 = x;
        double r10903013 = r10903012 * r10903012;
        double r10903014 = r10903011 * r10903013;
        return r10903014;
}

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. Using strategy rm
  3. Applied add-sqr-sqrt0.4

    \[\leadsto \color{blue}{\sqrt{\left(x \cdot 3.0\right) \cdot x} \cdot \sqrt{\left(x \cdot 3.0\right) \cdot x}}\]
  4. Taylor expanded around 0 0.6

    \[\leadsto \color{blue}{{x}^{2} \cdot {\left(\sqrt{3.0}\right)}^{2}}\]
  5. Simplified0.2

    \[\leadsto \color{blue}{\left(x \cdot x\right) \cdot 3.0}\]
  6. 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))