[SciPy-dev] FAIL: test_yn_zeros, test_ynp_zeros, Negative-order Bessels

David Cournapeau david at ar.media.kyoto-u.ac.jp
Mon Jan 26 06:29:35 EST 2009


Pauli Virtanen wrote:
> Mon, 26 Jan 2009 11:27:30 +0100, Nils Wagner wrote:
>   
>> ======================================================================
>> FAIL: test_yv_cephes_vs_amos (test_basic.TestBessel)
>> ----------------------------------------------------------------------
>>     
> [clip]
>   
>> Traceback (most recent call last):
>>    File
>> "/data/home/nwagner/local/lib/python2.5/site-packages/scipy/special/
>>     
> tests/test_basic.py",
>   
>> line 1650, in test_yv_cephes_vs_amos
>>      self.check_cephes_vs_amos(yv, yn, rtol=1e-11,
>> atol=1e-305)
>>    File
>> "/data/home/nwagner/local/lib/python2.5/site-packages/scipy/special/
>>     
> tests/test_basic.py",
>   
>> line 1640, in check_cephes_vs_amos
>>      assert c2.imag != 0, (v, z)
>> AssertionError: (301, 1.0)
>>     
>
> Appears to be a bug in cephes/yn on 64-bit systems:
>
>   
>>>> import scipy
>>>> import scipy.special as sc
>>>> scipy.__version__
>>>>         
> '0.7.0.dev5268'
>   
>>>> sc.yn(301,1)
>>>>         
> nan
>
> whereas on a 32-bit system it gives the correct answer:
>   

I wonder whether it would make sense to progressively use our own math
function library, at least for some core routines - R core for example,
does not use cephes or any external library (some functions are
"translations" from specfun though). Or is there a simpler solution
toward robust math routines (robustness against different architectures
and out of domain input, in particular) ?

David



More information about the SciPy-Dev mailing list