[SciPy-dev] Bessel functions from Boost

Pauli Virtanen pav@iki...
Thu Feb 12 16:27:10 CST 2009

Wed, 11 Feb 2009 03:31:30 +0900, David Cournapeau wrote:

> I started a branch, special_refactor. I added all the converted Boost
> data set (the .ipp files to .csv), plus the small python script I used
> to generate them. I started implementing the corresponding tests - but
> this takes some time, because of all this template stuff which is
> awkward to follow. The only thing to do is to find which function is
> called for which test with which parameter - someone more familiar with
> boost could to this much faster, I guess.

I added a couple of more functions to the tests:

They correctly point out that in 0.7.0:

+ The problems in Cephes's Iv (large argument), Yv (large order)
  and Kn (large order)

+ Numpy's complex-valued `arcsinh` and `arctanh` can have large
  relative errors (~1e-5) for small arguments (< eps)!

  Loss of precision in the naive implementation, I'll bet.

but they fail to spot the other known issues. But on the positive side,
the `arcsinh` issue is the only new one that came up.

One problem with these tests is that the data files are *huge*,
they currently total ~ 7 Mb. Even compressed, or saved as .npy files,
these would add ~ 2 Mb to the Scipy source tarball. So I'm not sure
what to do with this...

Pauli Virtanen

More information about the Scipy-dev mailing list