Average Error: 0.3 → 0.3
Time: 1.0m
Precision: 64
\[\left(x \cdot 27\right) \cdot y\]
\[\left(y \cdot 27\right) \cdot x\]
\left(x \cdot 27\right) \cdot y
\left(y \cdot 27\right) \cdot x
double f(double x, double y) {
        double r4882641 = x;
        double r4882642 = 27.0;
        double r4882643 = r4882641 * r4882642;
        double r4882644 = y;
        double r4882645 = r4882643 * r4882644;
        return r4882645;
}

double f(double x, double y) {
        double r4882646 = y;
        double r4882647 = 27.0;
        double r4882648 = r4882646 * r4882647;
        double r4882649 = x;
        double r4882650 = r4882648 * r4882649;
        return r4882650;
}

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 \left(y \cdot 27\right) \cdot x\]

Reproduce

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