[SciPy-dev] Bessel functions from Boost

Robert Kern robert.kern@gmail....
Sun Feb 8 22:43:29 CST 2009

On Sun, Feb 8, 2009 at 22:30, Michael Abshoff
<michael.abshoff@googlemail.com> wrote:
> Robert Kern wrote:
> Hi,
>> On Sun, Feb 8, 2009 at 21:38, Ondrej Certik <ondrej@certik.cz> 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.

Actually, that's all I meant by "Cythonize". You're right that it's
not quite the right word.

> 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.

Actually, we weren't talking about multiprecision at all until you
brought it up. The point of using the boost code wasn't the
multiprecision aspect, but just that it was an alternative
double-precision implementation that looked like it didn't have the
bugs Cephes has.

Multiprecision is an entirely different discussion, which goes some
way towards explaining why I was confused why you and Ondrej think
it's a good fit.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the Scipy-dev mailing list