http://www.gnu.org/software/gsl/
It's originally for Linux, but a quick google suggests there's several OSX builds available, and it also says it supports Cygwin and i found a Win32 port ready to go at http://gnuwin32.sourceforge.net/packages/gsl.htmThe GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. It is free software under the GNU General Public License. The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.
(note - thats an old v1.8 build, for v2.1 jack made 32+64 builds available in this post)
Overview of functions - http://www.gnu.org/software/gsl/manual/html_node/
I've only just started with it a few minutes ago so nothing to share just yet, but I did port example.c using the Win32 DLL (libgsl.dll) to test it's ok, and i just wanted to add to the forum to make it available in searches etc, perhaps it'll come in handy to someone else as google suggests it hasn't been used in PB before
Code: Select all
; int
; main (void)
; {
; double x = 5.0;
; double y = gsl_sf_bessel_J0 (x);
; printf ("J0(%g) = %.18e\n", x, y);
; Return 0;
; }
;
; The output is shown below, and should be correct to double-precision accuracy,
; J0(5) = -1.775967713143382920e-01
Prototype.d proto_gsl_sf_bessel_J0(value.d)
If OpenLibrary(0, "libgsl.dll")
gsl_sf_bessel_J0.proto_gsl_sf_bessel_J0 = GetFunction(0, "gsl_sf_bessel_J0")
x.d = 5.0
y.d = gsl_sf_bessel_J0(x)
Debug("J0(5) = " + StrD(y)) ;-1.775967713
EndIf