Thread: GNU Scientific Library

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    15

    GNU Scientific Library

    Hi,
    I need to use the cumulative inverse chi squared distribution as part of my C program. I realise that the GNU library includes this function:

    http://www.gnu.org/software/gsl/manu...tribution.html

    However, I have no idea how to use it. I would greatly appreciate specific instructions, as I have spent the whole day reading their manual/googleing stuff but couldn't figure it out. I am using Microsoft Visual C++ 6.0, and I am relatively new to C and programming in general.

    Thanks in advance.

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Well, what's the question? Usually P means probability to the left and Q means probability to the right, if that's what your question is. So the "Pinv" one is probably the one you want.

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    15
    Sorry, I wasn't clear. The question is not about the function, but rather about how to use it within my code. How do I compile it/ link it to be part of my program.. so that I can actually use the functions it provides in my program.

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Well, if you click on the link you provided you see this:
    Quote Originally Posted by GNU GSL Manual
    2.2 Compiling and Linking
    The library header files are installed in their own gsl directory. You should write any preprocessor include statements with a gsl/ directory prefix thus,

    #include <gsl/gsl_math.h>

    If the directory is not installed on the standard search path of your compiler you will also need to provide its location to the preprocessor as a command line flag. The default location of the gsl directory is /usr/local/include/gsl. A typical compilation command for a source file example.c with the GNU C compiler gcc is,

    $ gcc -Wall -I/usr/local/include -c example.c
    Assuming you are on a *nix box. If you're using an IDE, you'll have to put that in your library path.

  5. #5
    Registered User
    Join Date
    Apr 2008
    Posts
    15
    I'm actually on a Windows box. I'm wondering if I can just copy the file I need into my workspace in MS Visual C++ and try to compile that.

    I'll try that now I guess.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Gnu Scientific Library functions
    By zdream8 in forum C Programming
    Replies: 11
    Last Post: 06-09-2008, 09:37 AM
  2. using Gnu Scientific Library
    By zdream8 in forum C Programming
    Replies: 2
    Last Post: 05-27-2008, 04:45 PM
  3. The GNU Scientific Library - nonlinear fitting
    By lechat in forum C++ Programming
    Replies: 0
    Last Post: 12-03-2007, 02:58 PM
  4. Installing GNU C Library
    By prthealien in forum Linux Programming
    Replies: 2
    Last Post: 08-26-2006, 10:19 AM
  5. Adding GNU scientific library to Dev C++
    By Jreifler in forum C++ Programming
    Replies: 1
    Last Post: 03-05-2004, 02:20 PM