bugGNU Octave - Bugs: bug #37733, dec2hex errors out if fed integers.

 
 

bug #37733: dec2hex errors out if fed integers.

Submitter:  None
Submitted:  Wed 14 Nov 2012 06:28:55 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  j Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.2.4
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 14 Nov 2012 07:50:35 PM UTC, comment #2: 

That's a very quick response.

I'm fine. (I just cast to a double before calling
dec2hex, and it Works For Me.) I filed the bug in
the hopes that it would get patched up in future
releases. It appears that the future is closer
than I expected.

j

Anonymous
Wed 14 Nov 2012 06:39:08 PM UTC, comment #1: 

This has been fixed in recent versions of Octave.

It looks like you're using Ubuntu. Please upgrade to Ubuntu 12.10 where Octave 3.6 is available that has this fix. Alternatively, try this PPA:

https://launchpad.net/~mtmiller/+archive/octave






Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Wed 14 Nov 2012 06:28:55 PM UTC, original submission:  

The help for dec2hex claims it to:

"Return the hexadecimal string corresponding to the non-negative integer N."

If fed an actual integer type, it dies a horrible death when trying to take the natural log in the dec2base script it calls.
As shown thusly:



> dec2hex(2)
ans = 2

> dec2hex(int32(2))
error: octave_base_value::log (): wrong type argument `int32 scalar'
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: called from:
error:   /usr/share/octave/3.2.4/m/strings/dec2base.m at line 80, column 9
error:   /usr/share/octave/3.2.4/m/strings/dec2hex.m at line 46, column 12



Anonymous

 

(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 jordigh (Posted a comment)
  •  

    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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-11-14 jordigh StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code