MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Possible Bug Report: CoefficientList


On May 19, 3:47 am, "W_Craig Carter" <ccar... at mit.edu> wrote:
> Hello,
> The following will work and gives you a hint of what is going wrong:
>
> Table[Chances[numberDice, 6], {numberDice, 3, 5}]
>
> To avoid this,  localize the scope of x.
>
> Chances[dice_, sides_] :=
>  Module[{x}, CoefficientList[Expand[(Sum[x^i, {i, sides}])^dice], x]]
>
> Table[Chances[x, 6], {x, 3, 5}]

Thanks, and glad it's my bug with an inadvertantly multi-tasked
variable, rather than Mathematica.


  • Prev by Date: Re: FindRoot with a parameter
  • Next by Date: Problems with ListPlot
  • Previous by thread: Re: Possible Bug Report: CoefficientList
  • Next by thread: Re: Possible Bug Report: CoefficientList