help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] using gamma functions in a standalone manner


From: Brian Gough
Subject: Re: [Help-gsl] using gamma functions in a standalone manner
Date: Thu, 15 Apr 2004 19:51:04 +0100

Alex Lancaster writes:
 > I'm using the log(n!) factorial functions from GSL, specifically the
 > gsl_sf_lnfact() function.  I'd like to be able to extract this single
 > function, and include it in the source of my (GPLed) program, as I'd
 > rather not add GSL as a dependency for my source for one function.
 >
 > So before I get too far into the guts of GSL, does anybody know if
 > this is feasible with these particular special functions (which seem
 > to make heavy use of the various macros and utility functions)?  Does
 > anybody know a reasonably straightforward way to just compile gamma.c?
 > Or, put another way, what's a good strategy to minimize the amount of
 > GSL code I would need to put into my program that also avoids worrying
 > about getting too tangled up in sorting out the interdependencies?

Basically, you'll need to look at what the code is doing.  It handles
all the cases, including negative x.  Since you only want positive
integers you won't need them all.  If you trace through the code you
should find, by inspection, that there are only a much smaller number
of subroutines needed (the fact table, and the real lngamma_lanczos
method I think)

-- 
Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/




reply via email to

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