Average Error: 0.4 → 0.3
Time: 12.9s
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 r290137 = x;
        double r290138 = 27.0;
        double r290139 = r290137 * r290138;
        double r290140 = y;
        double r290141 = r290139 * r290140;
        return r290141;
}

double f(double x, double y) {
        double r290142 = x;
        double r290143 = 27.0;
        double r290144 = y;
        double r290145 = r290143 * r290144;
        double r290146 = r290142 * r290145;
        return r290146;
}

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