bugGNU Octave - Bugs: bug #42301, '<' should be transitive for...

 
 

bug #42301: '<' should be transitive for complex values

Submitted by:  David Spies <dspyz>
Submitted on:  Mon 05 May 2014 09:56:46 PM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: Wont FixAssigned to: None
Originator Name: Open/Closed: Closed
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.

 

Mon 05 May 2014 10:11:32 PM UTC, comment #1:

See https://www.gnu.org/software/octave/doc/interpreter/Comparison-Ops.html

You are right that it is not transitive, when comparing a mix of complex and real types. When all types are complex (== have non-zero imaginary parts), it should be transitive. And you're also right that it is not Matlab compatible.

See also the recent discussion at http://octave.1599824.n4.nabble.com/a-b-incorrect-for-complex-numbers-on-MinGW-tp4659102p4659104.html

Mike Miller <mtmiller>
Project Administrator
Mon 05 May 2014 09:56:46 PM UTC, original submission:

I can't figure out what rule octave uses to determine ordering among complex values, but it's clearly not transitive

octave:19> 3i < -4
ans = 1
octave:20> -4 < 0
ans = 1
octave:21> 3i < 0
ans = 0

In Matlab, it throws out the imaginary part and just compares the real part:

>> 2 < i


ans =

0

>> i < 2


ans =

1

>> i < 0


ans =

0

>> 0 < i


ans =

0

David Spies <dspyz>

 

(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 rik5 (Updated the item)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by dspyz (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
    Mon 26 Jan 2015 11:47:19 PM UTCrik5StatusNeed Info=>Wont Fix
      Open/ClosedOpen=>Closed
    Mon 05 May 2014 10:11:32 PM UTCmtmillerCategoryOctave Function=>Libraries
      StatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1