Average Error: 0.3 → 0.4
Time: 10.9s
Precision: 64
\[\left(x \cdot 27\right) \cdot y\]
\[\left(\sqrt{27} \cdot \left(x \cdot y\right)\right) \cdot \sqrt{27}\]
\left(x \cdot 27\right) \cdot y
\left(\sqrt{27} \cdot \left(x \cdot y\right)\right) \cdot \sqrt{27}
double f(double x, double y) {
        double r7413883 = x;
        double r7413884 = 27.0;
        double r7413885 = r7413883 * r7413884;
        double r7413886 = y;
        double r7413887 = r7413885 * r7413886;
        return r7413887;
}

double f(double x, double y) {
        double r7413888 = 27.0;
        double r7413889 = sqrt(r7413888);
        double r7413890 = x;
        double r7413891 = y;
        double r7413892 = r7413890 * r7413891;
        double r7413893 = r7413889 * r7413892;
        double r7413894 = r7413893 * r7413889;
        return r7413894;
}

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

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

Reproduce

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