bugGNU Octave - Bugs: bug #55198, rat() should support complex...

 
 

bug #55198: rat() should support complex numbers

Submitter:  Rik <rik5>
Submitted:  Mon 10 Dec 2018 10:56:00 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  3 - Low Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  10.1.0 (current default) Planned Release:  10.1.0 (current default)
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 25 Apr 2024 03:47:30 PM UTC, comment #5: 

Fixed the tolerance problem here: https://hg.savannah.gnu.org/hgweb/octave/rev/4401310ad737

Passes all tests now, including extreme complex values.

Closing as fixed, but can be reopened if there are problems.

Arun Giridhar <arungiridhar>
Group Member
Wed 24 Apr 2024 09:40:32 PM UTC, comment #4: 

Tested and pushed this feature request here: https://hg.savannah.gnu.org/hgweb/octave/rev/2a0cdc52220b

This works for finite complex inputs.

For infinite complex inputs like complex (inf, 0) or complex (0, inf), or inf*i, the existing tolerance calculation makes it zero and it causes an error. I have marked that as a known failure for now.

Arun Giridhar <arungiridhar>
Group Member
Wed 06 Mar 2019 06:32:38 AM UTC, comment #3: 

And the user's ID was vtk_001, not 0001.

John W. Eaton <jwe>
Group administrator
Wed 06 Mar 2019 06:31:59 AM UTC, comment #2: 

Oh, I see now.  I deleted them.

John W. Eaton <jwe>
Group administrator
Wed 06 Mar 2019 06:30:20 AM UTC, comment #1: 

The files uploaded here have a TMW copyright.  How can we have them removed?

vtk_0001, you can't just copy files from Matlab.

John W. Eaton <jwe>
Group administrator
Mon 10 Dec 2018 10:56:00 PM UTC, original submission:  

Matlab's version of rat() supports complex numbers.  Octave's should as well.

For reference, here is a sample result:


rat (complex (0.5, pi))

ans =

  3×18 char array

    '1 + 1/(-2)        '
    ' +i* ...          '
    '3 + 1/(7 + 1/(16))'


I would argue that it might be better to have the real part of the number on one line and the complex part on the next, rather than splitting the value in to three parts.

Rik <rik5>
Group administrator

 

(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 arungiridhar (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by vtk_001 (Updated the item)
  • -email is unavailable- added by rik5 (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 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    15:47 arungiridhar StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2024-04-24 arungiridhar StatusConfirmed Ready For Test
    2024-04-24 arungiridhar Fixed ReleaseNone 10.1.0 (current default)
        Planned ReleaseNone 10.1.0 (current default)
    2019-03-06 jwe Attached File#46441 Removed
    2019-03-06 jwe Attached File#46440 Removed
    2019-03-06 vtk_001 Attached File- Added rational package.zip, #46440
        Attached File- Added Screenshot from 2019-03-05 23-40-43.png, #46441
    2018-12-10 rik5 Priority5 - Normal 3 - Low

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code