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 r298034 = x;
        double r298035 = 27.0;
        double r298036 = r298034 * r298035;
        double r298037 = y;
        double r298038 = r298036 * r298037;
        return r298038;
}

double f(double x, double y) {
        double r298039 = x;
        double r298040 = 27.0;
        double r298041 = y;
        double r298042 = r298040 * r298041;
        double r298043 = r298039 * r298042;
        return r298043;
}

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 
(FPCore (x y)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, F"
  :precision binary64
  (* (* x 27) y))