Average Error: 0.4 → 0.3
Time: 7.1s
Precision: 64
\[\left(x \cdot 27.0\right) \cdot y\]
\[\left(y \cdot 27.0\right) \cdot x\]
\left(x \cdot 27.0\right) \cdot y
\left(y \cdot 27.0\right) \cdot x
double f(double x, double y) {
        double r4740960 = x;
        double r4740961 = 27.0;
        double r4740962 = r4740960 * r4740961;
        double r4740963 = y;
        double r4740964 = r4740962 * r4740963;
        return r4740964;
}

double f(double x, double y) {
        double r4740965 = y;
        double r4740966 = 27.0;
        double r4740967 = r4740965 * r4740966;
        double r4740968 = x;
        double r4740969 = r4740967 * r4740968;
        return r4740969;
}

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

    \[\left(x \cdot 27.0\right) \cdot y\]
  2. Using strategy rm
  3. Applied associate-*l*0.3

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

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

Reproduce

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