[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] ln gamma |x| too large error
From: |
Brian Gough |
Subject: |
Re: [Help-gsl] ln gamma |x| too large error |
Date: |
Tue, 20 Mar 2007 12:35:47 +0000 |
User-agent: |
Wanderlust/2.14.0 (Africa) Emacs/21.3 Mule/5.0 (SAKAKI) |
At Fri, 16 Mar 2007 10:38:48 +0000 (GMT),
Clare Quarman wrote:
> When using the special function lngamma_sgn_e, sometimes I receive an
> error, the only info is that it's from line 1249 in gamma.c. Looking at
> this bit of gamma.c, a nearby comment states that |x| is too large for the
> fractional part to be extracted.
>
> I'm wondering if this restriction the same both for +ve and -ve values of
> x, and what constitutes too large a magnitude for x?
>
> Does anyone understand what's going on here?
The gamma function has a singularity at every negative integer, and
for x < -1e15 there isn't enough precision to distinguish between
integer and non-integer values in double-precision -- that is when
this error should occur.
--
Brian Gough
Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/