Average Error: 0.4 → 0.3
Time: 14.8s
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 r126336 = x;
        double r126337 = 27.0;
        double r126338 = r126336 * r126337;
        double r126339 = y;
        double r126340 = r126338 * r126339;
        return r126340;
}

double f(double x, double y) {
        double r126341 = 27.0;
        double r126342 = x;
        double r126343 = y;
        double r126344 = r126342 * r126343;
        double r126345 = r126341 * r126344;
        return r126345;
}

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 +o rules:numerics
(FPCore (x y)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, F"
  (* (* x 27.0) y))