Ticket #853 (closed defect: fixed)

Opened 20 months ago

Last modified 19 months ago

scipy.special.jv incorrect values for complex x & negative non-integer order

Reported by: pv Owned by: somebody
Priority: high Milestone: 0.8.0
Component: scipy.special Version: devel
Keywords: Cc:

Description

Consider

>>> import scipy.special as sc
>>> sc.jv(-0.5, 1), 
(0.4310988680183761
>>> sc.jv(-0.5, 1+0j)
(1.5305821969908724e-17+0.67139670714180366j)

The latter result is wrong, the former correct. However,

>>> sc.jv(-1, 1)
-0.4400505857449335
>>> sc.jv(-1, 1+0j)
(-0.44005058574493355+5.3888874330650448e-17j)

I.e. the problem exists only for non-integer negative v and complex x.

I think the problem lies in amos_wrappers.c:rotate -- I don't think the identity used there is valid for non-integer orders; the rotation is OK for the Hankel function, but not for the Re/Im parts of Bessel J.

Change History

Changed 20 months ago by pv

  • status changed from new to closed
  • resolution set to fixed

Should be fixed in r5516.

Changed 19 months ago by pv

Iv had the same problem; fixed in r5521

Note: See TracTickets for help on using tickets.