bugGNU Octave - Bugs: bug #44867, Bessel functions scaled even if...

 
 

bug #44867: Bessel functions scaled even if opt=0

Submitted by:  None
Submitted on:  Fri 17 Apr 2015 05:34:55 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: None
Originator Name: Byron BoultonOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.8.2
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Mon 20 Apr 2015 12:23:35 PM UTC, comment #6:

Thank you for such a quick response to this!

Byron Boulton <bkboulton>
Fri 17 Apr 2015 10:04:08 PM UTC, comment #5:

I checked in a changeset here that uses stricter input validation of the OPT argument (http://hg.savannah.gnu.org/hgweb/octave/rev/93b3757a9623). It also updates the documentation. This will be a part of the 4.0 release coming out shortly.

Rik <rik5>
Project Administrator
Fri 17 Apr 2015 08:05:32 PM UTC, comment #4:

+verbose+

>> besselj (1, i, 3.0)

Error using besselj
SCALE must be 0 or 1.
-verbose-

Thanks for your fast response. This change will also necessitate a documentation update for the bessel functions. Should I open a separate issue for that?

Byron Boulton <bkboulton>
Fri 17 Apr 2015 07:52:26 PM UTC, comment #3:

One final test I need data on.

I've got a changeset that works for this.

Rik <rik5>
Project Administrator
Fri 17 Apr 2015 06:59:52 PM UTC, comment #2:
Byron Boulton <bkboulton>
Fri 17 Apr 2015 06:40:50 PM UTC, comment #1:

Do you have access to Matlab? I'd like to know how much input validation they are really doing.

Example Code to Run:

Post the results back to this bug report and I'll have a go at changing Octave.

Rik <rik5>
Project Administrator
Fri 17 Apr 2015 05:34:55 PM UTC, original submission:

besselj, bessely, besseli, besselk, and besselh all have an "opt" parameter, which if present causes the bessel* functions to return a scaled value. This is true whether "opt" has the value 0, 1, 'hokuspokus', or anything.

Attached is a small script which demonstrates besselj getting scaled by providing "opt" values of 0, 1, and 'hokuspokus'.

It would make more sense for this to be implemented the way it is in MATLAB so that "opt" must be a 0 or a 1. If 0, don't scale; if 1, scale.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #33705:  scale_besselj.m added by None (130B - text/x-objcsrc - Script demonstrating odd scaling behavior of bessel* functions.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bkboulton (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 17 Apr 2015 10:04:08 PM UTCrik5StatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Fri 17 Apr 2015 06:40:50 PM UTCrik5StatusNone=>Need Info
    Fri 17 Apr 2015 05:34:55 PM UTCNoneAttached File-=>Added scale_besselj.m, #33705

    Back to the top


    Powered by Savane 3.1-cleanup1