Average Error: 0.3 → 0.3
Time: 9.9s
Precision: 64
\[\left(x \cdot 27\right) \cdot y\]
\[27 \cdot \left(x \cdot y\right)\]
\left(x \cdot 27\right) \cdot y
27 \cdot \left(x \cdot y\right)
double f(double x, double y) {
        double r12960988 = x;
        double r12960989 = 27.0;
        double r12960990 = r12960988 * r12960989;
        double r12960991 = y;
        double r12960992 = r12960990 * r12960991;
        return r12960992;
}

double f(double x, double y) {
        double r12960993 = 27.0;
        double r12960994 = x;
        double r12960995 = y;
        double r12960996 = r12960994 * r12960995;
        double r12960997 = r12960993 * r12960996;
        return r12960997;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.3

    \[\left(x \cdot 27\right) \cdot y\]
  2. Taylor expanded around 0 0.3

    \[\leadsto \color{blue}{27 \cdot \left(x \cdot y\right)}\]
  3. Using strategy rm
  4. Applied add-sqr-sqrt0.3

    \[\leadsto \color{blue}{\left(\sqrt{27} \cdot \sqrt{27}\right)} \cdot \left(x \cdot y\right)\]
  5. Applied associate-*l*0.4

    \[\leadsto \color{blue}{\sqrt{27} \cdot \left(\sqrt{27} \cdot \left(x \cdot y\right)\right)}\]
  6. Using strategy rm
  7. Applied add-sqr-sqrt0.4

    \[\leadsto \sqrt{\color{blue}{\sqrt{27} \cdot \sqrt{27}}} \cdot \left(\sqrt{27} \cdot \left(x \cdot y\right)\right)\]
  8. Applied sqrt-prod0.7

    \[\leadsto \color{blue}{\left(\sqrt{\sqrt{27}} \cdot \sqrt{\sqrt{27}}\right)} \cdot \left(\sqrt{27} \cdot \left(x \cdot y\right)\right)\]
  9. Applied associate-*l*0.6

    \[\leadsto \color{blue}{\sqrt{\sqrt{27}} \cdot \left(\sqrt{\sqrt{27}} \cdot \left(\sqrt{27} \cdot \left(x \cdot y\right)\right)\right)}\]
  10. Taylor expanded around 0 0.3

    \[\leadsto \color{blue}{x \cdot \left(y \cdot {\left(\sqrt{27}\right)}^{2}\right)}\]
  11. Simplified0.3

    \[\leadsto \color{blue}{27 \cdot \left(x \cdot y\right)}\]
  12. Final simplification0.3

    \[\leadsto 27 \cdot \left(x \cdot y\right)\]

Reproduce

herbie shell --seed 2019174 +o rules:numerics
(FPCore (x y)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, F"
  (* (* x 27.0) y))