Average Error: 0.4 → 0.3
Time: 15.9s
Precision: 64
\[\left(x \cdot 27\right) \cdot y\]
\[27 \cdot \left(x \cdot y\right)\]
\left(x \cdot 27\right) \cdot y
27 \cdot \left(x \cdot y\right)
double f(double x, double y) {
        double r147746 = x;
        double r147747 = 27.0;
        double r147748 = r147746 * r147747;
        double r147749 = y;
        double r147750 = r147748 * r147749;
        return r147750;
}

double f(double x, double y) {
        double r147751 = 27.0;
        double r147752 = x;
        double r147753 = y;
        double r147754 = r147752 * r147753;
        double r147755 = r147751 * r147754;
        return r147755;
}

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. Using strategy rm
  5. Applied *-un-lft-identity0.3

    \[\leadsto \color{blue}{\left(1 \cdot x\right)} \cdot \left(27 \cdot y\right)\]
  6. Applied associate-*l*0.3

    \[\leadsto \color{blue}{1 \cdot \left(x \cdot \left(27 \cdot y\right)\right)}\]
  7. Simplified0.3

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

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

Reproduce

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