bugGNU Octave - Bugs: bug #48316, besselj gives NaN for moderately...

 
 

bug #48316: besselj gives NaN for moderately large inputs (1e10)

Submitted by:  Colin Macdonald <cbm>
Submitted on:  Sun 26 Jun 2016 05:55:18 AM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 30 Jun 2016 07:44:31 PM UTC, comment #2:

Scipy appears to use a combination of the amos library and the cephes bessel functions (http://www.netlib.org/cephes/).

Mike Miller <mtmiller>
Project Administrator
Thu 30 Jun 2016 07:35:48 PM UTC, comment #1:

Changing status to confirmed, and adding some details from the mailing list (http://thread.gmane.org/gmane.comp.gnu.octave.maintainers/46617).

The bessel functions come from the amos library (http://netlib.org/amos/) which is embedded in liboctave, so any numerical problems are inherited from that implementation.

Mike Miller <mtmiller>
Project Administrator
Sun 26 Jun 2016 05:55:18 AM UTC, original submission:

Octave gives "besselj(1, 1e10)" as "NaN + NaNI".

Octave:

Symbolic pkg, converted to double:

The relative accuracy is fine before blow-up:

(Ironically, I found this when I went looking for a function with good relative error behaviour even though it decays to zero! viz., #48307)

Colin Macdonald <cbm>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by cbm (Submitted the item)
  • -unavailable- added by cbm
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 16 Nov 2016 06:31:41 PM UTCmtmillerOperating SystemOther=>Any
    Thu 30 Jun 2016 07:35:48 PM UTCmtmillerStatusNone=>Confirmed
    Sun 26 Jun 2016 05:55:18 AM UTCcbmCarbon-Copy-=>Added sebald

    Back to the top


    Powered by Savane 3.1-cleanup1