bugGNU Octave - Bugs: bug #39608, hex2num: parse single-precision...

 
 

bug #39608: hex2num: parse single-precision hex strings

Submitted by:  Federico Gennari <fedemone>
Submitted on:  Mon 29 Jul 2013 01:37:52 PM UTC  
 
Category: Octave FunctionSeverity: 1 - Wish
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: None
Originator Name: Federico GennariOpen/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 Aug 2013 02:19:54 AM UTC, comment #3:

I added the requested single precision extension in the following changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/f010db8b710c

This feature will be part of the next major release of Octave.

Mike Miller <mtmiller>
Project Administrator
Tue 30 Jul 2013 01:24:21 PM UTC, comment #2:

I understand you comment, and the possibility to choose single precision computing via additional argument can be the right solution. Otherwise, it should be implemented an additional function like this one:

http://www.mathworks.com/matlabcentral/fileexchange/6927-hexsingle2num

Federico Gennari <fedemone>
Mon 29 Jul 2013 06:50:48 PM UTC, comment #1:

The problem with this change is that it's not a Matlab compatibility request, it would break Matlab compability. hex2num already has a well-defined behavior if the input string contains fewer than 16 characters, it is padded on the right with zeros. So it can't differentiate between double and single precision given only a string.

We could, however, add a second optional argument for the class to return, like eps() and zeros() do, which would be non-Matlab-compatible. So for example something like this:

Would that address your request?

Mike Miller <mtmiller>
Project Administrator
Mon 29 Jul 2013 01:37:52 PM UTC, original submission:

This is the companion to request id #39607. Both in Matlab and Octave the hex2num function is working with double precision output only. It would be a good improvement for the function to give a single precision output when single precision input is given.

Federico Gennari <fedemone>

 

(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 mtmiller (Posted a comment)
  • -unavailable- added by fedemone (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 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 05 Aug 2013 02:19:54 AM UTCmtmillerStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Tue 30 Jul 2013 02:55:26 PM UTCmtmillerStatusNeed Info=>Confirmed
    Mon 29 Jul 2013 06:50:48 PM UTCmtmillerSeverity3 - Normal=>1 - Wish
      Item GroupMatlab Compatibility=>Feature Request
      StatusNone=>Need Info
      Release3.6.4=>dev
      Operating SystemMicrosoft Windows=>Any
      Summaryhex2num improvement respect to matlab=>hex2num: parse single-precision hex strings

    Back to the top


    Powered by Savane 3.1-cleanup1