Average Error: 0.3 → 0.3
Time: 32.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 r132136 = x;
        double r132137 = 27.0;
        double r132138 = r132136 * r132137;
        double r132139 = y;
        double r132140 = r132138 * r132139;
        return r132140;
}

double f(double x, double y) {
        double r132141 = 27.0;
        double r132142 = x;
        double r132143 = y;
        double r132144 = r132142 * r132143;
        double r132145 = r132141 * r132144;
        return r132145;
}

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

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

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

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

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

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

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

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

Reproduce

herbie shell --seed 2019322 +o rules:numerics
(FPCore (x y)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, F"
  :precision binary64
  (* (* x 27) y))