Average Error: 0.4 → 0.3
Time: 9.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 r217831 = x;
        double r217832 = 27.0;
        double r217833 = r217831 * r217832;
        double r217834 = y;
        double r217835 = r217833 * r217834;
        return r217835;
}

double f(double x, double y) {
        double r217836 = 27.0;
        double r217837 = x;
        double r217838 = y;
        double r217839 = r217837 * r217838;
        double r217840 = r217836 * r217839;
        return r217840;
}

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

    \[\leadsto x \cdot \color{blue}{\left(y \cdot 27\right)}\]
  5. Taylor expanded around 0 0.3

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

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

Reproduce

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