Average Error: 0.3 → 0.4
Time: 9.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 r10044922 = x;
        double r10044923 = 27.0;
        double r10044924 = r10044922 * r10044923;
        double r10044925 = y;
        double r10044926 = r10044924 * r10044925;
        return r10044926;
}

double f(double x, double y) {
        double r10044927 = 27.0;
        double r10044928 = sqrt(r10044927);
        double r10044929 = x;
        double r10044930 = y;
        double r10044931 = r10044929 * r10044930;
        double r10044932 = r10044928 * r10044931;
        double r10044933 = r10044932 * r10044928;
        return r10044933;
}

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 
(FPCore (x y)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, F"
  (* (* x 27.0) y))