- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've been going in circles on this one (I'm probably orbiting a very simple answer). Is there a gamma function (for non-integers) in version 11.0? There are some indications from my searching that it exists in the libimf library but I thought that this was linked by default. I tried forcing this through "-L -limf" and didn't find "gamma" or "tgamma". I also tried MKL but I'm not finding it there either. Thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe that some the Intel RT libraries (such as libmmd.lib) contain a gamma function callable from C. I can only see lower-case names containing 'gamma' in the symbols in, for example, libmmd.lib. I believe that that function gives ln Γ(x), rather than Γ(x).
Fortran 2008 provides the gamma function, but your 11.1 compiler probably does not.
However, the old Amos library at http://www.netlib.org/amos/ should serve you fine for now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Adam,
You could obtain a gamma function subroutine source file that you could include in your project from the NIST Guide to Available Mathematical Software (GAMS): http://gams.nist.gov/
At that site you can use the name search for "gamma" to find several possible routines that might be useful.
Regards,
Greg T.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe the Intel Fortran Compiler version 12.0 introduced the Fortran 2008 intrinsics GAMMA() and LOG_GAMMA() (along with various others, such as Bessel functions, error functions and a bunch of other Fortran 2008 features.). The library containing them, libimf, is linked automatically.
The version 11 compiler is simply too old to have all these features from Fortran 2008. Are you able to upgrade? (Current compiler version is 17.0).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, everyone! The source code that Greg T. suggested is tempting since I don't have to go through the hassle of upgrading the compiler. However, an upgrade is probably the best solution at this point since I'm many versions behind.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page