gammainc & GSL

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

gammainc & GSL

Teemu Ikonen

I had some problems with the function gammainc which gives wrong results
with large argument values (see my bugreport in bug-octave). When
investigating further I found out that the reason was that Octave is
trying to calculate gammainc by calling a fortran routine from SLATEC for
a slightly different form of the function (Tricomis form,
x^-a * gammainc(x, a)) and then correcting the result, which fails with
large a and x.

I tried to dug a real implementation from the net and found a nice looking
one from GNU scientific library [1]. Adding GSL routines to Octave
isn't trivial because of GSL's error handling and other supporting
functions which would have to be changed to comply with Octave, but GSL
contains a lot of useful code (in C!), especially in the special functions
section, so we could have quite a lot more functionality as a result.

Now if I start to integrate GSL into libcruft, is there any chance that
the modifications could be included in the Octave distribution?

Teemu

[1] http://sources.redhat.com/gsl/ 


Reply | Threaded
Open this post in threaded view
|

Re: gammainc & GSL

Paul Kienzle-5
If you design the interface so that you can access the functions from
.oct files, then it doesn't matter too much if it goes into the base
distribution.  I'll be happy to mention it in my matlab compatibility
database.  That way, people who don't need the extra 2 Mb of code don't
have to install it.  The only thing this needs is a patch so that user
functions can override builtins.

Paul Kienzle
[hidden email]

On Sun, Oct 08, 2000 at 02:36:26AM +0300, Teemu Ikonen wrote:
...

>
> I tried to dug a real implementation from the net and found a nice looking
> one from GNU scientific library [1]. Adding GSL routines to Octave
> isn't trivial because of GSL's error handling and other supporting
> functions which would have to be changed to comply with Octave, but GSL
> contains a lot of useful code (in C!), especially in the special functions
> section, so we could have quite a lot more functionality as a result.
>
> Now if I start to integrate GSL into libcruft, is there any chance that
> the modifications could be included in the Octave distribution?
>
> Teemu
>
> [1] http://sources.redhat.com/gsl/ 
>
>