MathGroup Archive 2009

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

Search the Archive

Re: Bug with Hypergeometric2F1?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99394] Re: [mg99384] Bug with Hypergeometric2F1?
  • From: Daniel Lichtblau <danl at wolfram.com>
  • Date: Tue, 5 May 2009 05:38:22 -0400 (EDT)
  • References: <200905041002.GAA22748@smc.vnet.net>

irchans wrote:
> When I run this code:
> 
> vol1[n_, k_] = Sum[ Binomial[n, i], {i, 0, k}]
> vol1[1000, 1]
> vol1[1000, 1.]
> 
> I get
> 
> Out[1] = 1001
> 
> 
> Out[2] = 7.12935*10^288
> 
> 
> I am running Mathematica 7.0.0 on windows 2000.  Does anyone else have
> this problem?

I would not refer to that as a "problem", insofar as it is expected 
behavior. What you observe is a consequence of cancellation error. 
Specifically, you have subtracted one large number from another. Each 
has magnitude around 10^301. The second one is precise to at best 16 
places, hence the result cannot possibly be 296 or so orders of 
magnitude smaller than the inputs, as is the case for teh exact computation.

A second issue is that there is no compelling reason to think the 
hypergeometric will be evaluated precisely to 16 digits, when given 
input correct to that many places. In this case it seems to be correct 
to around 12 digits. Hence a final sum around 10^289.

Daniel Lichtblau
WOlfram Research





  • Prev by Date: Re: Re: New Wolfram Tutorial Collection documentation is ready
  • Next by Date: Re: problems with DSolve
  • Previous by thread: Bug with Hypergeometric2F1?
  • Next by thread: Re: Bug with Hypergeometric2F1?