Average Error: 0.3 → 0.3
Time: 10.5s
Precision: 64
\[\left(x \cdot 27\right) \cdot y\]
\[\left(x \cdot y\right) \cdot 27\]
\left(x \cdot 27\right) \cdot y
\left(x \cdot y\right) \cdot 27
double f(double x, double y) {
        double r15614265 = x;
        double r15614266 = 27.0;
        double r15614267 = r15614265 * r15614266;
        double r15614268 = y;
        double r15614269 = r15614267 * r15614268;
        return r15614269;
}

double f(double x, double y) {
        double r15614270 = x;
        double r15614271 = y;
        double r15614272 = r15614270 * r15614271;
        double r15614273 = 27.0;
        double r15614274 = r15614272 * r15614273;
        return r15614274;
}

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}{\left(x \cdot y\right) \cdot 27}\]
  12. Final simplification0.3

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

Reproduce

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