Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13630 > unrolled thread

Re: Possible bug in InverseGammaRegularized?

Started bySseziwa Mukasa <mukasa@gmail.com>
First post2013-02-27 08:04 +0000
Last post2013-02-27 08:04 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Possible bug in InverseGammaRegularized? Sseziwa Mukasa <mukasa@gmail.com> - 2013-02-27 08:04 +0000

#13630 — Re: Possible bug in InverseGammaRegularized?

FromSseziwa Mukasa <mukasa@gmail.com>
Date2013-02-27 08:04 +0000
SubjectRe: Possible bug in InverseGammaRegularized?
Message-ID<kgken1$4d8$1@smc.vnet.net>
On Feb 26, 2013, at 1:10 AM, psycho_dad <s.nesseris@gmail.com> wrote:

> Hi,
> The following code gives the \delta \chi^2 for the confidence intervals as a function of the number of parameters n and desired number of sigmas m:
> \delta \chi^2=2 InverseGammaRegularized[n/2, 1 - Erf[m/Sqrt[2]]]
>
> The RHS can also be written as 2InverseGammaRegularized[n/2,0, Erf[m/Sqrt[2]]]
> (notice the 0 in the arguments)
>
> For example, for 5 params, 1 sigma and 5 digit precision:
> In[1]:= n = 5; m = 1;
> In[2]:=
> N[2 InverseGammaRegularized[n/2, 1 - Erf[m/Sqrt[2]]], 5]
> N[2 InverseGammaRegularized[n/2, 0, Erf[m/Sqrt[2]]], 5]
>
> Out[2]= 5.8876
> Out[3]= 5.8876
>
> but when I ask for only 3 digit precision, Mathematica 9 gives the following torrent of errors in the second case:
>
> In[4]:=
> N[2 InverseGammaRegularized[n/2, 1 - Erf[m/Sqrt[2]]], 3]
> N[2 InverseGammaRegularized[n/2, 0, Erf[m/Sqrt[2]]], 3]
>
> Out[4]= 5.8876
> During evaluation of In[4]:= $RecursionLimit::reclim: Recursion depth of 1024 exceeded. >>
> ... (more errors)
> During evaluation of In[4]:= General::stop: Further output of $RecursionLimit::reclim will be suppressed during this calculation. >>
>
> Is this a bug or am I missing something?

My guess is InverseGammaRegularized is written such that it uses the specified precision and its internal algorithms don't converge at low precision.

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web