MathGroup Archive 2009

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

Search the Archive

Re: Re: Bug with Hypergeometric2F1?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99444] Re: [mg99422] Re: [mg99384] Bug with Hypergeometric2F1?
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Wed, 6 May 2009 05:20:46 -0400 (EDT)
  • References: <200905050943.FAA20864@smc.vnet.net>

On 5 May 2009, at 18:43, Bob Hanlon wrote:

> Or change the function definition to force precision
>
> vol1[n_, k_] := Sum[Binomial[Rationalize[n, 0], i],
>  {i, 0, Rationalize[k, 0]}]
>
> vol1 @@@ {{1000, 1}, {1000, 1.}, {1000., 1}, {1000., 1.}}
>
> {1001,1001,1001,1001}
>
>
> Bob Hanlon

Actually, in this case (when you use SetDelayed instead of Set as in  
the original post) Rationalize is not needed:

  vol1[n_, k_] := Sum[Binomial[n, i], {i, 0, k}]

vol1 @@@ {{1000, 1}, {1000, 1.}, {1000., 1}, {1000., 1.}}
{1001, 1001, 1001., 1001.}

Andrzej Kozlowski


  • Prev by Date: Re: why does DownValues not return all downvalues for a
  • Next by Date: GRAPHICS IN A DO LOOP DOES NOTHING
  • Previous by thread: Re: Bug with Hypergeometric2F1?
  • Next by thread: Re: Bug with Hypergeometric2F1?