[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gsl] [bug #30510] problems with hyperg_U(a,b,x) for x<0

From: Brian Gough
Subject: [Bug-gsl] [bug #30510] problems with hyperg_U(a,b,x) for x<0
Date: Wed, 21 Jul 2010 20:17:46 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv: Gecko/2009061118 Fedora/3.0.11-1.fc9 Firefox/3.0.11


                 Summary: problems with hyperg_U(a,b,x) for x<0
                 Project: GNU Scientific Library
            Submitted by: bjg
            Submitted on: Wed 21 Jul 2010 09:17:45 PM BST
                Category: Runtime error
                Severity: 3 - Normal
        Operating System: 
                  Status: None
             Assigned to: None
             Open/Closed: Open
                 Release: 1.14
         Discussion Lock: Any



Reply-To: address@hidden
From: Raymond Rogers <address@hidden>
To: address@hidden
Subject: Re: [Bug-gsl] hyperg_U(a,b,x) Questions about x<0 and values
Date: Thu, 08 Jul 2010 11:49:15 -0500

Brian Gough <address@hidden>
Subject: Re: [Bug-gsl] hyperg_U(a,b,x) Questions about x<0 and values
        of a
To: address@hidden
Cc: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset=US-ASCII

At Wed, 07 Jul 2010 10:14:34 -0500,                                          
Raymond Rogers wrote:                                                        

> >                                                                          
> > 1) I was unable to find the valid domain of  the argument a when x<0.    
> > Experimenting yields what seem to be erratic results.  Apparently        
> > correct answers occur when {x<0&a<0& a  integer}.  References would be   
> > sufficient.   Unfortunately {x<0,a<0} is exactly the wrong range for my  
> > problem; but the recursion relations can be used to stretch to a>0.  If  
> > I can find a range of correct operation for the domain of "a" of width

| Brian Gough                                                                
| Thanks for the email.  There are some comments about the domain for        
| the hyperg_U_negx function in specfunc/hyperg_U.c -- do they help?         

They explain some things, but I believe the section

  if (b_int && b >= 2 && !(a_int && a <= (b - 2))){}
  else {}

is implemented incorrectly; and probably the preceding section as well.  Some
restructuring of the code would make things clea\
rer; but things like that should probably done in a different forum: email,
blog, etc...
I think the switches might be wrong.  In any case it seems that b=1 has a
hole.  Is there a source for this code?

Note: the new NIST Mathematical handbook might have better algorithms.  I am
certainly no expert on implementing mathematical \
functions (except for finding ways to make them fail).


Reply-To: address@hidden
From: Raymond Rogers <address@hidden>
To: address@hidden
Subject: [Bug-gsl]      Re: hyperg_U(a, b, x) Questions about x<0 and values
of a,
Date: Sun, 11 Jul 2010 14:43:43 -0500

hyperg_U basically fails with b=1, a non-integer; because
gsl_sf_poch_e(1+a-b,-a,&r1); is throwing a domain error when given
Checking on and using b=1 after a-integer is checked is illustrated
below in Octave.   I also put in recursion to evaluate b>=2.
I checked the b=1 expression against Maple; for a few values x<0,a<0,b=1
and x<0,a<0,b>=2 integer.
Unfortunately the routine in Octave to call hyperg_U  is only set up for
real returns, which was okay for versions <1.14 .  Sad to say I am the
one who implemented the hyperg_U interface, and will probably have to go
back :-( .  Integrating these functions into Octave was not pleasant;
but perhaps somebody made it easier.  I did translate the active parts
of hyperg_U into octave though; so it can be used in that way.


# Test function to evaluate b=1 for gsl 1.14 hyperg_U x<0
function anss=hyperg_U_negx_1(a,b,x)
#neg, int, a is already taken care of so use it
    if (int_a && a<=0)
    elseif (int_b && (b==1))
#from the new NIST DLMF 13.2.41

    elseif (b>=2)
#DLMF 13.3.10
        anss=((b-1-a)*hyperg_U_negx_1(a,b-1,x) +


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]