9

Anyone know of a good statistics library for C? I'm looking for something that is commonly used and not a small project. EDIT: must be free!

Tyler Brock
  • 29,626
  • 15
  • 79
  • 79
  • To be more specific, I'm writing an option modeling library in C and I just need to be able to do simple stats calculations like a cumulative normal distribution. – Tyler Brock Nov 22 '09 at 02:36

3 Answers3

12

gsl (http://www.gnu.org/software/gsl/) is widely available, portable, and has a lot of nice functionality.

Jonathan Chang
  • 24,567
  • 5
  • 34
  • 33
2

Statistics are frequently done in other languages, but some of those languages will be callable from C. I'd recommend looking at R and Octave; the latter is an open source Matlab work-alike. Both are programming languages in their own right, but many other languages can be called from C.

Michael Ekstrand
  • 28,379
  • 9
  • 61
  • 93
-2

In my opinion, MATLAB is a very good choice you can use for that. Here is an article on how to call MATLAB from C.

It ain't cheap. But you did not specify anything about the library being cheap or free. Plus, you are mentioning it's a big project.... :-)

Pablo Santa Cruz
  • 176,835
  • 32
  • 241
  • 292