Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Possible Bug Report: CoefficientList

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88879] Re: Possible Bug Report: CoefficientList
  • From: AngleWyrm <anglewyrm at yahoo.com>
  • Date: Tue, 20 May 2008 02:26:48 -0400 (EDT)
  • References: <200805190915.FAA12556@smc.vnet.net> <g0rlso$elr$1@smc.vnet.net>

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