Average Error: 0.3 → 0.4
Time: 12.3s
Precision: 64
\[\left(x \cdot 27\right) \cdot y\]
\[\left(y \cdot 27\right) \cdot x\]
\left(x \cdot 27\right) \cdot y
\left(y \cdot 27\right) \cdot x
double f(double x, double y) {
        double r11997427 = x;
        double r11997428 = 27.0;
        double r11997429 = r11997427 * r11997428;
        double r11997430 = y;
        double r11997431 = r11997429 * r11997430;
        return r11997431;
}

double f(double x, double y) {
        double r11997432 = y;
        double r11997433 = 27.0;
        double r11997434 = r11997432 * r11997433;
        double r11997435 = x;
        double r11997436 = r11997434 * r11997435;
        return r11997436;
}

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.4

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

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

Reproduce

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