[SciPy-dev] Bessel functions from Boost
Sun Feb 8 19:10:46 CST 2009
On Mon, Feb 9, 2009 at 2:23 AM, Pauli Virtanen <firstname.lastname@example.org> wrote:
> Some of the real-valued Bessel function implementations from the Cephes
> library currently used in scipy.special have problems. (See #503, #851,
> #853, #854.) Fixing some of these (eg. #503) would require implementing
> robust computation algorithms from scratch. (The Specfun code is IMHO too
> obscure and badly commented to be relied on as an alternative.)
> However, the Boost library seems to have good implementations Bessel
> (and some other) special functions:
> Also the license seems Scipy-compatible:
> So, I'd like to bring these over to Scipy, to replace some of the Cephes
> The only problem is that being in Boost, they are written in C++, and I
> guess we can't make Scipy to depend on it.
> I see two options:
> A) Bundle the relevant subset of Boost with Scipy. The problem here
> is that the special functions seem to pull in a sizable subset
> of the whole Boost library.
> Also, I don't know how well compilers handle the template-happy
> C++ in boost today on all platforms where Scipy must work on.
I am -1 on boost. It is a nightmare to support on many platforms, and
it is unreadable for people who are not C++ hackers.
> B) Convert the Boost code from C++ to C. This is in fact quite trivial
> search-and-replace operation. One example here:
> I'd like to see (B) happen in scipy.special. Thoughts?
This is much better - I really don't see the point of using C++ for
math functions. I am ok with this.
More information about the Scipy-dev