Average Error: 0.3 → 0.3
Time: 2.0s
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 r176732 = x;
        double r176733 = 27.0;
        double r176734 = r176732 * r176733;
        double r176735 = y;
        double r176736 = r176734 * r176735;
        return r176736;
}

double f(double x, double y) {
        double r176737 = x;
        double r176738 = 27.0;
        double r176739 = y;
        double r176740 = r176738 * r176739;
        double r176741 = r176737 * r176740;
        return r176741;
}

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

Reproduce

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