Average Error: 0.3 → 0.3
Time: 22.0s
Precision: 64
\[\left(x \cdot 27.0\right) \cdot y\]
\[\left(y \cdot 27.0\right) \cdot x\]
\left(x \cdot 27.0\right) \cdot y
\left(y \cdot 27.0\right) \cdot x
double f(double x, double y) {
        double r7595642 = x;
        double r7595643 = 27.0;
        double r7595644 = r7595642 * r7595643;
        double r7595645 = y;
        double r7595646 = r7595644 * r7595645;
        return r7595646;
}

double f(double x, double y) {
        double r7595647 = y;
        double r7595648 = 27.0;
        double r7595649 = r7595647 * r7595648;
        double r7595650 = x;
        double r7595651 = r7595649 * r7595650;
        return r7595651;
}

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.0\right) \cdot y\]
  2. Using strategy rm
  3. Applied associate-*l*0.3

    \[\leadsto \color{blue}{x \cdot \left(27.0 \cdot y\right)}\]
  4. Final simplification0.3

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

Reproduce

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