bugGNU Octave - Bugs: bug #56632, polyval should return with invalid...

 
 

bug #56632: polyval should return with invalid input

Submitter:  Marco Caliari <caliari>
Submitted:  Mon 15 Jul 2019 01:16:42 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 15 Jul 2019 08:06:39 PM UTC, comment #2: 

@Marco: Many of these older functions have not been reviewed and brought in to the modern era.  I overhauled the input validation completely in this changeset (https://hg.savannah.gnu.org/hgweb/octave/rev/23523700b6b8).  It fixes the error you identified and several other incompatibilities with Matlab.

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Mon 15 Jul 2019 01:19:04 PM UTC, comment #1: 

Sorry, probably the check


elseif (! isvector (p))


should be replaced by


elseif (! isvector (p) || (isvector (p) && ! isnumeric (p)))


Marco Caliari <caliari>
Group Member
Mon 15 Jul 2019 01:16:42 PM UTC, original submission:  

The following code should return with an error


polyval (@(x) sin(x), 1)


but it passes. Probably the check


elseif (! isvector (p))
+verbatim+

should be substituted with

+verbatim+
elsif ((! isvector) || (isvector (p) && ! isnumeric (p)))


Marco Caliari <caliari>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by caliari (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-07-15 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code