Average Error: 0.3 → 0.3
Time: 9.6s
Precision: 64
\[\left(x \cdot 27\right) \cdot y\]
\[x \cdot \left(27 \cdot y\right)\]
\left(x \cdot 27\right) \cdot y
x \cdot \left(27 \cdot y\right)
double f(double x, double y) {
        double r207635 = x;
        double r207636 = 27.0;
        double r207637 = r207635 * r207636;
        double r207638 = y;
        double r207639 = r207637 * r207638;
        return r207639;
}

double f(double x, double y) {
        double r207640 = x;
        double r207641 = 27.0;
        double r207642 = y;
        double r207643 = r207641 * r207642;
        double r207644 = r207640 * r207643;
        return r207644;
}

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. Using strategy rm
  3. Applied associate-*l*0.3

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

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

Reproduce

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