bugGNU Octave - Bugs: bug #48184, num2hex silently discards...

 
 

bug #48184: num2hex silently discards imaginary part: should raise error

Submitter:  Colin Macdonald <cbm>
Submitted:  Wed 08 Jun 2016 07:02:38 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
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
   

Wed 08 Jun 2016 08:56:41 PM UTC, comment #3: 

Fixed on the default branch with an error message and validation tests:

http://hg.savannah.gnu.org/hgweb/octave/rev/6b4f6339df91

Mike Miller <mtmiller>
Group Member
Wed 08 Jun 2016 08:11:01 PM UTC, comment #2: 

Matlab raises an error, "input must be real" or something like that.

Colin Macdonald <cbm>
Wed 08 Jun 2016 07:17:04 PM UTC, comment #1: 

When you say should raise an error, do you mean that Matlab raises an error about the input being complex?

Rik <rik5>
Group administrator
Wed 08 Jun 2016 07:02:38 PM UTC, original submission:  


>> num2hex(3)
ans = 4008000000000000
>> num2hex(3+2i)
ans = 4008000000000000


The latter example should raise an error.

Colin Macdonald <cbm>

 

(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 mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by cbm (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-06-08 mtmiller StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2016-06-08 rik5 StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code