Re: Bug with Hypergeometric2F1?
- To: mathgroup at smc.vnet.net
- Subject: [mg99435] Re: Bug with Hypergeometric2F1?
- From: dh <dh at metrohm.com>
- Date: Tue, 5 May 2009 06:03:08 -0400 (EDT)
- References: <gtnk81$3os$1@smc.vnet.net>
Hi, the output from the first command is: 2^n - Binomial[n, 1 + k] Hypergeometric2F1[1, 1 + k - n, 2 + k, -1] Setting n=1000, this is a difference between 2 large numbers. 2^1000 has something like 300 (decimal) digits! Therefore, machine numbers ("1.") with 16 digits can not give an accurate result. The 16 digits are simply whipped out by taking the difference. However, Mathematica can calculate with arbitrary large integers. Therefore, if you give integer input ("1" instead of "1.") you get an accurate result. Daniel 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? > >