Average Error: 0.4 → 0.3
Time: 6.2s
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 r3199653 = x;
        double r3199654 = 27.0;
        double r3199655 = r3199653 * r3199654;
        double r3199656 = y;
        double r3199657 = r3199655 * r3199656;
        return r3199657;
}

double f(double x, double y) {
        double r3199658 = y;
        double r3199659 = 27.0;
        double r3199660 = r3199658 * r3199659;
        double r3199661 = x;
        double r3199662 = r3199660 * r3199661;
        return r3199662;
}

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