Average Error: 0.3 → 0.3
Time: 31.4s
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 r157041 = x;
        double r157042 = 27.0;
        double r157043 = r157041 * r157042;
        double r157044 = y;
        double r157045 = r157043 * r157044;
        return r157045;
}

double f(double x, double y) {
        double r157046 = x;
        double r157047 = y;
        double r157048 = 27.0;
        double r157049 = r157047 * r157048;
        double r157050 = r157046 * r157049;
        return r157050;
}

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