Average Error: 0.3 → 0.4
Time: 2.2s
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 r143701 = x;
        double r143702 = 27.0;
        double r143703 = r143701 * r143702;
        double r143704 = y;
        double r143705 = r143703 * r143704;
        return r143705;
}

double f(double x, double y) {
        double r143706 = x;
        double r143707 = 27.0;
        double r143708 = y;
        double r143709 = r143707 * r143708;
        double r143710 = r143706 * r143709;
        return r143710;
}

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

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

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

Reproduce

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