Opened 6 years ago
Closed 4 years ago
#810 closed defect (fixed)
J1(x) returns NaN for x << 0
Reported by: | pkienzle | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | SasView Next Release +1 |
Component: | SasView | Keywords: | |
Cc: | Work Package: | SasView Bug Fixing |
Description
The cephes math function for J1 in lib/sas_J1.c returns NaN for values of x << 0.
Mathematica says J1(-x) = -J1(x) (http://www.wolframalpha.com/input/?i=J_1(-x)). The series expansion as given in the DLMF (http://dlmf.nist.gov/10.2) supports this.
The code in sas_J1.c is the same as that in the cephes library, so rather than a translation error, it appears to be an error in the cephes library itself.
Change History (1)
comment:1 Changed 4 years ago by pkienzle
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
This looks like it has been fixed.
The code in sasmodels/models/lib/sas_J1.c says: