math library for Haskell
Am I looking in the wrong place (http://haskell.org/ghc/docs/latest/html/libraries/ ) or just not seeing it, but I was hoping there would be a math library for Haskell that would include, e.g., a Gamma function and the like. -L --
On Wed, Jul 25, 2007 at 06:03:04PM +1000, Lloyd Allison wrote:
Am I looking in the wrong place (http://haskell.org/ghc/docs/latest/html/libraries/ ) or just not seeing it, but I was hoping there would be a math library for Haskell that would include, e.g., a Gamma function and the like.
You're looking in the wrong place; libraries are listed at hackage.haskell.org nowadays. (The other link is just for libraries that come with GHC, an ever-shrinking fraction of the total...) The wiki might also help, http://www.haskell.org/haskellwiki/Libraries_and_tools/Mathematics. Don't see a gamma function there either, unfortunately. Stefan
Lloyd Allison wrote:
Am I looking in the wrong place (http://haskell.org/ghc/docs/latest/html/libraries/ ) or just not seeing it, but I was hoping there would be a math library for Haskell that would include, e.g., a Gamma function and the like.
-L
I think the best thing would be to wrap the Gamma function form the GSL: http://www.gnu.org/software/gsl Or add the Gamma wrapper to the Haskell wrapping GSLHaskell at http://dis.um.es/~alberto/GSLHaskell/ Note: Get the darcs version of GSLHaskell.
I have included a binding to gsl_sf_gamma in the darcs repo of GSLHaskell: http://dis.um.es/~alberto/GSLHaskell/doc/GSL-Special.html#v%3Agamma I will try to upload to hackage a recent version of the library in a few days. Alberto On Wednesday 25 July 2007 10:03, Lloyd Allison wrote:
Am I looking in the wrong place (http://haskell.org/ghc/docs/latest/html/libraries/ ) or just not seeing it, but I was hoping there would be a math library for Haskell that would include, e.g., a Gamma function and the like.
-L -- _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
Alberto Ruiz wrote:
I have included a binding to gsl_sf_gamma in the darcs repo of GSLHaskell:
http://dis.um.es/~alberto/GSLHaskell/doc/GSL-Special.html#v%3Agamma
I will try to upload to hackage a recent version of the library in a few days.
Alberto
It occurs to me that generating the binding for all the GSL "Special" functions by hand may be labor intensive. Would it be reasonable to have a (perhaps customized) tool generate the wrapping code? I am interested since I just ported various data processing from Mathematica to GSL plus C code. (At the moment much of what I use (e.g. interpolation) is not in the GSL wrapper). Cheers, Chris Kuklewicz
On Jul 25, 2007, at 6:39 AM, Chris Kuklewicz wrote:
Alberto Ruiz wrote:
I have included a binding to gsl_sf_gamma in the darcs repo of GSLHaskell: http://dis.um.es/~alberto/GSLHaskell/doc/GSL-Special.html#v%3Agamma I will try to upload to hackage a recent version of the library in a few days. Alberto
It occurs to me that generating the binding for all the GSL "Special" functions by hand may be labor intensive. Would it be reasonable to have a (perhaps customized) tool generate the wrapping code?
I have some functions that make wrapping the GSL special functions much simpler. I've used them to wrap all of the Airy and Bessel functions. The process could be automated, but there are a few more cases than convenient. (For example, the computationally expensive functions take an additional argument specifying how much precision is desired.) It wouldn't be too much work to automate the most common cases (double arg, double return and double arg, error struct return); perhaps doing the remainder by hand is reasonable. I also have bindings for all of the ODE integration routines and all of the numerical differentiation routines. All are low level, just exposing the underlying GSL routines without any "convenience wrapper". I can make them available if anyone is interested. Best Wishes, Greg
participants (5)
-
Alberto Ruiz -
Chris Kuklewicz -
Gregory Wright -
Lloyd Allison -
Stefan O'Rear