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.
- References:
- Possible Bug Report: CoefficientList
- From: anglewyrm@yahoo.com
- Possible Bug Report: CoefficientList