Average Error: 0.3 → 0.4
Time: 1.8s
Precision: 64
\[\left(x \cdot 27\right) \cdot y\]
\[x \cdot \left(27 \cdot y\right)\]
\left(x \cdot 27\right) \cdot y
x \cdot \left(27 \cdot y\right)
double f(double x, double y) {
        double r223519 = x;
        double r223520 = 27.0;
        double r223521 = r223519 * r223520;
        double r223522 = y;
        double r223523 = r223521 * r223522;
        return r223523;
}

double f(double x, double y) {
        double r223524 = x;
        double r223525 = 27.0;
        double r223526 = y;
        double r223527 = r223525 * r223526;
        double r223528 = r223524 * r223527;
        return r223528;
}

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 x \cdot \left(27 \cdot y\right)\]

Reproduce

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