Average Error: 0.3 → 0.4
Time: 25.9s
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 r11949566 = x;
        double r11949567 = 27.0;
        double r11949568 = r11949566 * r11949567;
        double r11949569 = y;
        double r11949570 = r11949568 * r11949569;
        return r11949570;
}

double f(double x, double y) {
        double r11949571 = y;
        double r11949572 = 27.0;
        double r11949573 = r11949571 * r11949572;
        double r11949574 = x;
        double r11949575 = r11949573 * r11949574;
        return r11949575;
}

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))