Average Error: 0.3 → 0.3
Time: 32.3s
Precision: 64
\[\left(x \cdot 27\right) \cdot y\]
\[x \cdot \left(y \cdot 27\right)\]
\left(x \cdot 27\right) \cdot y
x \cdot \left(y \cdot 27\right)
double f(double x, double y) {
        double r18808 = x;
        double r18809 = 27.0;
        double r18810 = r18808 * r18809;
        double r18811 = y;
        double r18812 = r18810 * r18811;
        return r18812;
}

double f(double x, double y) {
        double r18813 = x;
        double r18814 = y;
        double r18815 = 27.0;
        double r18816 = r18814 * r18815;
        double r18817 = r18813 * r18816;
        return r18817;
}

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. Simplified0.3

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

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

Reproduce

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