Average Error: 0.2 → 0.2
Time: 10.2s
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 r11619715 = x;
        double r11619716 = 3.0;
        double r11619717 = r11619715 * r11619716;
        double r11619718 = r11619717 * r11619715;
        return r11619718;
}

double f(double x) {
        double r11619719 = 3.0;
        double r11619720 = x;
        double r11619721 = r11619720 * r11619720;
        double r11619722 = r11619719 * r11619721;
        return r11619722;
}

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