Average Error: 0.4 → 0.3
Time: 5.6s
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 r169896 = x;
        double r169897 = 27.0;
        double r169898 = r169896 * r169897;
        double r169899 = y;
        double r169900 = r169898 * r169899;
        return r169900;
}

double f(double x, double y) {
        double r169901 = y;
        double r169902 = 27.0;
        double r169903 = r169901 * r169902;
        double r169904 = x;
        double r169905 = r169903 * r169904;
        return r169905;
}

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

    \[\leadsto \left(x \cdot 27\right) \cdot \color{blue}{{y}^{1}}\]
  4. Applied pow10.4

    \[\leadsto \left(x \cdot \color{blue}{{27}^{1}}\right) \cdot {y}^{1}\]
  5. Applied pow10.4

    \[\leadsto \left(\color{blue}{{x}^{1}} \cdot {27}^{1}\right) \cdot {y}^{1}\]
  6. Applied pow-prod-down0.4

    \[\leadsto \color{blue}{{\left(x \cdot 27\right)}^{1}} \cdot {y}^{1}\]
  7. Applied pow-prod-down0.4

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

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

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

Reproduce

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