[SciPy-dev] Bessel functions from Boost
Charles R Harris
Tue Feb 10 07:08:23 CST 2009
On Tue, Feb 10, 2009 at 5:39 AM, David Cournapeau <firstname.lastname@example.org>wrote:
> On Mon, Feb 9, 2009 at 7:35 PM, David Cournapeau
> <email@example.com> wrote:
> > Pauli Virtanen wrote:
> >> Sun, 08 Feb 2009 20:25:37 -0800, Michael Abshoff wrote:
> >>> David Cournapeau wrote:
> >>>> This is much better - I really don't see the point of using C++ for
> >>>> math functions. I am ok with this.
> >>> Out of curiosity: I checked the boost website and it states for the
> >>> lib:
> >>> "All the implementations are fully generic and support the use of
> >>> arbitrary "real-number" types, although they are optimised for use with
> >>> types with known-about significand (or mantissa) sizes: typically
> >>> double or long double."
> >>> Since I assume some people around here are interested in arbitrary
> >>> precisions and after looking some more at the documentation it seems
> >>> that that library only supports this via using an NTL type which in
> >>> uses GMP. NTL itself is GPLed, GMP is LGPL, so either one does not fit
> >>> the licensing requirements of Scipy.
> >> Yeh, arbitrary precision could be nice in principle.
> >> But as I see it, at the moment it's out-of-scope for Scipy. Right now,
> >> only need good implementations in double precision. These we can get for
> >> some functions for example by adapting the Boost code (and re-testing
> >> -- this is much less work than rewriting everything from scratch.
> > Are you familiar with boost testing ? I wonder whether it would be
> > possible to automatically convert it to something usable for scipy (the
> > .ipp files which contain the data should be relatively easy to convert
> > to python, they all look the same with almost no code at all).
> I started to work on this, actually. Getting the test data is easy,
> but there is still some manual work to know which function is used for
> which data (it does not look like the files are consistent enough so
> that the mapping data file -> function tested can be done
> Shall I integrate this into scipy ?
I think you should also take a look at Cody's netlib.org/specfun. It has the
Bessel functions along with the tests and Cody does careful work with
attention to detail and error. As Pauli says, the netlib specfunc isn't the
same as the specfunc in Scipy. The notes in specfun are also worth a read.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Scipy-dev