Average Error: 0.3 → 0.3
Time: 17.0s
Precision: binary64
Cost: 320
\[\left(x \cdot 27\right) \cdot y\]
\[\left(x \cdot 27\right) \cdot y\]
\left(x \cdot 27\right) \cdot y
\left(x \cdot 27\right) \cdot y
(FPCore (x y) :precision binary64 (* (* x 27.0) y))
(FPCore (x y) :precision binary64 (* (* x 27.0) y))
double code(double x, double y) {
	return (x * 27.0) * y;
}
double code(double x, double y) {
	return (x * 27.0) * y;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error0.3
Cost320
\[x \cdot \left(27 \cdot y\right)\]
Alternative 2
Error53.5
Cost64
\[0\]
Alternative 3
Error61.6
Cost64
\[1\]

Error

Time

Derivation

  1. Initial program 0.3

    \[\left(x \cdot 27\right) \cdot y\]
  2. Using strategy rm
  3. Applied pow1_binary64_59360.3

    \[\leadsto \left(x \cdot 27\right) \cdot \color{blue}{{y}^{1}}\]
  4. Applied pow1_binary64_59360.3

    \[\leadsto \left(x \cdot \color{blue}{{27}^{1}}\right) \cdot {y}^{1}\]
  5. Applied pow1_binary64_59360.3

    \[\leadsto \left(\color{blue}{{x}^{1}} \cdot {27}^{1}\right) \cdot {y}^{1}\]
  6. Applied pow-prod-down_binary64_59460.3

    \[\leadsto \color{blue}{{\left(x \cdot 27\right)}^{1}} \cdot {y}^{1}\]
  7. Applied pow-prod-down_binary64_59460.3

    \[\leadsto \color{blue}{{\left(\left(x \cdot 27\right) \cdot y\right)}^{1}}\]
  8. Using strategy rm
  9. Applied *-commutative_binary64_58060.3

    \[\leadsto {\color{blue}{\left(y \cdot \left(x \cdot 27\right)\right)}}^{1}\]
  10. Simplified0.3

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

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

Reproduce

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