Average Error: 0.3 → 0.3
Time: 9.3s
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 r3807928 = x;
        double r3807929 = 27.0;
        double r3807930 = r3807928 * r3807929;
        double r3807931 = y;
        double r3807932 = r3807930 * r3807931;
        return r3807932;
}

double f(double x, double y) {
        double r3807933 = y;
        double r3807934 = 27.0;
        double r3807935 = r3807933 * r3807934;
        double r3807936 = x;
        double r3807937 = r3807935 * r3807936;
        return r3807937;
}

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