bugGNU Octave - Bugs: bug #42563, norm([]) returns garbage

 
 

bug #42563: norm([]) returns garbage

Submitted by:  Johan Löfberg <johanlofberg>
Submitted on:  Mon 16 Jun 2014 05:47:15 AM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.8.1Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 16 Jun 2014 04:06:06 PM UTC, comment #4:

I modified Pantxo's changeset slightly to avoid an extra test on the input class of the variable and committed it to the stable branch here (http://hg.savannah.gnu.org/hgweb/octave/rev/7bf70dc7f06c). This will be a part of the 3.8.2 bug fix release. Thanks for the patch Pantxo!

Rik <rik5>
Project Administrator
Mon 16 Jun 2014 04:01:46 PM UTC, comment #3:

This is actually a regression from 3.2.4 where this used to return 0.

Rik <rik5>
Project Administrator
Mon 16 Jun 2014 10:48:19 AM UTC, comment #2:

Something has happened with the post (markup?). The original post said "0 would be the expected result".

Johan Löfberg <johanlofberg>
Mon 16 Jun 2014 10:45:08 AM UTC, comment #1:

Hi,

I tested "norm ([])" in Matlab and it returns 0, not 1. Why would you expect 1?

If you agree with this return value, I attached a simple patch for xnorm.cc.

(file #31562)

Pantxo Diribarne <pantxo>
Project Member
Mon 16 Jun 2014 05:47:15 AM UTC, original submission:
  1. would be the expected result, but I get random results
Johan Löfberg <johanlofberg>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #31562:  bugnorm_42563.patch added by pantxo (796B - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by pantxo (Updated the item)
  • -unavailable- added by johanlofberg (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 16 Jun 2014 04:06:06 PM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Mon 16 Jun 2014 04:01:46 PM UTCrik5Item GroupIncorrect Result=>Regression
      StatusNone=>Confirmed
    Mon 16 Jun 2014 10:45:08 AM UTCpantxoAttached File-=>Added bugnorm_42563.patch, #31562

    Back to the top


    Powered by Savane 3.1-cleanup1