[SciPy-dev] Bessel functions from Boost
Sun Feb 8 22:30:27 CST 2009
Robert Kern wrote:
> On Sun, Feb 8, 2009 at 21:38, Ondrej Certik <email@example.com> wrote:
>>>> I completely agree with Michael here. Why not to use mpmath? It's bsd,
>>>> it started as part of sympy and it was the GSoC project for sympy the
>>>> last year. It's pretty competitive with gmp (e.g. for the pi digits
>>>> calculations, it's even faster than Sage, unless Sage fixed that
>>>> already), but one doesn't have to use gmp, if one doesn't want to.
>>>> And I think both Fredrik and other mpmath and sympy developers would
>>>> help to make mpmath working with scipy. Definitely I would. I think
>>>> that's a better option, than to port some boost stuff and then you
>>>> would have to maintain it. If you use mpmath, all of us win, imho.
>>> ??? For implementing a C ufunc?
>> Using Cython? If it's as fast as anything else, why not. If it's not
>> as fast, then that would be a reason not to use it.
> Well, show me the code. :-)
> I wasn't aware that mpmath could be Cythonized. If it can, and the
> result is reasonably fast, that would be *really* useful.
I believe Ondrej was talking about using Cython to reduce call overhead,
not to Cythonize mpmath which might or might not pay off.
Given that Cepehes does not do arbitrary precision taking a look at
mpmath before you decide to reinvent the wheel seems like a good idea. I
don't really see the problem since mpmath works and in some cases is
competitive with MPFR. And I don't meant that silly Pi to some 10^X
computation which isn't particularly useful in the real world. It is
quite hard to do arbitrary precision arithmetic and numerically stable
special functions, so building on top of mpmath has its advantages.
More information about the Scipy-dev