bugGNU Octave - Bugs: bug #53450, or:Neither producing correct...

 
 

bug #53450: or:Neither producing correct result nor error,warning

Submitted by:  Dildar Sk <hodor123456>
Submitted on:  Sat 24 Mar 2018 08:48:04 AM UTC  
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Missed Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Dildar Sk Open/Closed:  Closed
Release:  dev 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.

 

Tue 17 Apr 2018 03:19:40 PM UTC, comment #5: 

Great.  So Octave is doing the right thing now.  Marking bug as fixed and closing report.

Rik <rik5>
Project Administrator
Tue 17 Apr 2018 07:08:14 AM UTC, comment #4: 

FWIW, here the results of the commands in comment #1 in Matlab R2016a:

>> or([])
Error using  |
Not enough input arguments.

>> not([])

ans =

     []

>>

Markus M├╝tzel <mmuetzel>
Project Member
Tue 17 Apr 2018 01:01:10 AM UTC, comment #3: 

Besides, if these binary functions would not accept only one argument, then the statement "At least one argument is required" in their docstrings had also to be removed or updated.

Anonymous
Tue 17 Apr 2018 12:43:23 AM UTC, comment #2: 

As a start, I checked in a change that produces an error if or() or any other binary function is called with just a single argument.  See this changeset http://hg.savannah.gnu.org/hgweb/octave/rev/308a272bbe3c.

Rik <rik5>
Project Administrator
Mon 16 Apr 2018 09:22:53 PM UTC, comment #1: 

Could you check in Matlab if there is a special exception for empty inputs by testing

or ([])

Also, what does this return?

not ([])

It might [], or it might be 1 since [] could be seen as false.

Rik <rik5>
Project Administrator
Sat 24 Mar 2018 08:48:04 AM UTC, original submission:  

In MATLAB,

>> or(1:10)
Error using  |
Not enough input arguments.

Where in Octave,

>> or([1:10])
ans =

    1    2    3    4    5    6    7    8    9   10

>>

It should have produce error,because we are providing only
or(X) [But help says,or(X,Y)].
And here output is definitely wrong,It should have 1.

Dildar Sk <hodor123456>

 

(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 mmuetzel (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by hodor123456 (Submitted the item)
  • -email is unavailable- added by hodor123456
  •  

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

    Only project members can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-17 rik5 StatusNeed Info => Fixed
        Open/ClosedOpen => Closed
    2018-04-17 rik5 StatusConfirmed => Need Info
    2018-04-16 rik5 StatusNone => Confirmed
    2018-03-24 hodor123456 Carbon-Copy- => Added dildarsk101010@gmail.com

    Back to the top


    Powered by Savane 3.5