Average Error: 0.4 → 0.3
Time: 1.3s
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 r259900 = x;
        double r259901 = 27.0;
        double r259902 = r259900 * r259901;
        double r259903 = y;
        double r259904 = r259902 * r259903;
        return r259904;
}

double f(double x, double y) {
        double r259905 = x;
        double r259906 = 27.0;
        double r259907 = y;
        double r259908 = r259906 * r259907;
        double r259909 = r259905 * r259908;
        return r259909;
}

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