Re: Re: Bug with Hypergeometric2F1?
- To: mathgroup at smc.vnet.net
- Subject: [mg99449] Re: [mg99406] Re: Bug with Hypergeometric2F1?
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Wed, 6 May 2009 05:21:42 -0400 (EDT)
- References: <200905050940.FAA20697@smc.vnet.net>
On 5 May 2009, at 18:40, Bill Rowe wrote:
> If
> you want to use machine precision numbers you should be using
> NSum rather than Sum. That is:
>
> In[4]:= f[n_, k_] := NSum[Binomial[n, i], {i, 0, k}]
>
> In[5]:= f[1000, 1.]
>
> Out[5]= 1001.
The supposed advantage of NSUm over Sum in this particular case is a
mere illusion.
g[n_, k_] := Sum[Binomial[n, i], {i, 0, k}]
g[1000, 1.]
1001
Note that you are using SetDelayed while the original post has Set;
hence the difference.
Andrzej Kozlowski
- References:
- Re: Bug with Hypergeometric2F1?
- From: Bill Rowe <readnews@sbcglobal.net>
- Re: Bug with Hypergeometric2F1?