Thread: Question on libraries for scientific computing (statistics)

  1. #1
    Registered User
    Join Date
    Aug 2010
    Posts
    20

    Question on libraries for scientific computing (statistics)

    Dear all,

    Although I am very new to the C programming language, I am really, but really happy with its capacities compared to standard statistical packages (much, much faster for large scale analyses!).

    In this respect, I have searched around potential libraries for scientific computing, and found out: the GNU Scientific Library (GSL) as well as the Apophenia library.

    Both provide an excellent number of statistical functions. However, there are several important functions in statistics that they still miss, and it is hard for a beginner like to implement them within a short period of time.

    Hence, are you aware of any other potential libraries for scientific computing that might contain additional functions for statistical analysis? My concern is that, as a beginner in C programming, I may be missing some important resources.

    Grateful for any tips.

    Cheers!

    Tiago

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    You haven't been too specific .... look here.

    If you're willing to look at commercially available libraries (you have to pay) look up NAG and IMSL libraries.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  3. #3
    Registered User
    Join Date
    Aug 2010
    Posts
    20
    Thank you so much! This is a step further: I did not know that there were commercial libraries with statistical functions. My R world is too free to think about that.

    The commercial prices are, however, compatible with academic purposes. Even though google always helps a lot, are there any tutorials/books on additional potential non-free libraries (for dummies)?

    thanks again!

    Tiago

  4. #4
    -bleh-
    Join Date
    Aug 2010
    Location
    somewhere in this universe
    Posts
    463
    Don't think you can get NAG for individual license.

  5. #5
    Registered User
    Join Date
    Aug 2010
    Posts
    20
    Why's that?

  6. #6
    Registered User
    Join Date
    Aug 2010
    Location
    England
    Posts
    90
    I have a very old book "100 Solved problems in statistics published by McGraw Hill".

    Unfortunately the solutions are written in Basic, but it's not difficult to convert - mostly it's line for line conversion. I'm sure that there's a newer version out there.

    What type of calculation are you looking for - statistics cover a wide range - from basic mean, standard deviation through linear and multiple regression, chi suare tests and so on.

    If I've know the solutions you need, I can probably dig them out for you.
    Never re-write code unless the user benefits

  7. #7
    -bleh-
    Join Date
    Aug 2010
    Location
    somewhere in this universe
    Posts
    463
    Quote Originally Posted by TiagoPereira View Post
    Why's that?
    I wanted a student licence from NAG like a year ago. So I contacted this guy I know, he worked with the NAG people. And the NAG people told that they don't offer single student licence. I'm not sure about non-student licence, but I figure the price would be very steep.

  8. #8
    Registered User
    Join Date
    Jun 2010
    Location
    Michigan, USA
    Posts
    143
    Quote Originally Posted by nimitzhunter View Post
    Don't think you can get NAG for individual license.
    Quote Originally Posted by TiagoPereira View Post
    Why's that?
    Quote Originally Posted by nimitzhunter View Post
    I wanted a student licence from NAG like a year ago. So I contacted this guy I know, he worked with the NAG people. And the NAG people told that they don't offer single student licence. I'm not sure about non-student licence, but I figure the price would be very steep.
    Apparently NAG is the Numerical Algorithms Group.

  9. #9
    Registered User
    Join Date
    Aug 2010
    Posts
    20
    Many thanks, guys!

    John, I basically need everything is statistics. right now I am eager to find a function that computes the natural logarithm of large factorials. For example, in R it is impossible to compute factorials for numbers larger than 177. However, the natural logarithm of the factorial is very straightforward:


    lnfactorial(418500)
    4998752.3

    If you have any function to compute that, please, let me know asap.

    Cheers!

    Tiago

  10. #10
    Registered User
    Join Date
    Aug 2010
    Location
    England
    Posts
    90
    I haven't run that far.

    Don't understand the question.

    Which statistical problem are you trying to solve.

    That would help me guide you.
    Never re-write code unless the user benefits

  11. #11
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,401
    Shouldn't the following piece of code work:
    Code:
    double lnfactorial(int fact)
    {
       double x = 0.0;
       for(int i = 1; i <= fact; ++i)
       {
          x += log((double)i);
       }
       return x;
    }
    That function returned 4998752.25384429 for lnfactorial(418500). I wouldn't be surprised by some floating-point inaccuracy, but given the magnitude of the numbers, it should relatively small.
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

  12. #12
    Registered User
    Join Date
    Aug 2010
    Posts
    20

  13. #13
    Registered User
    Join Date
    Aug 2010
    Posts
    20
    Just to follow up on my previous post: the NAG library costs around U$2,500 (Brazilian price; we have some additional taxes) plus "maintenance" (U$400,00), whereas the IMSL is cheaper: U$ 195 (no additional taxes). Although the NAG C library can be less expensive depending on the country, I believe that its price is always above 2k.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question about allegro and other graphics libraries....
    By o0obruceleeo0o in forum Game Programming
    Replies: 2
    Last Post: 06-11-2003, 11:02 PM
  2. Self regiserting DLLs question and libraries question.
    By ApocalypticTime in forum Windows Programming
    Replies: 2
    Last Post: 03-22-2003, 02:02 PM
  3. what does this warningmean???
    By kreyes in forum C Programming
    Replies: 5
    Last Post: 03-04-2002, 07:53 AM
  4. Libraries... another question from me...
    By sean in forum C++ Programming
    Replies: 1
    Last Post: 11-05-2001, 12:02 AM
  5. Replies: 3
    Last Post: 11-01-2001, 09:09 PM