bugGNU Octave - Bugs: bug #63282, Make dec2base accept negative...

 
 

bug #63282: Make dec2base accept negative and/or fractional inputs

Submitter:  Arun Giridhar <arungiridhar>
Submitted:  Thu 27 Oct 2022 07:36:34 PM UTC
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  In Progress Assigned to:  arungiridhar
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Thu 27 Oct 2022 07:36:34 PM UTC, original submission:  

This bug report is to track a WIP patch for dec2base and dec2bin. The main aims are the following:

  • Make dec2base accept negative integer inputs.
  • Remove the negative input code and all other input checks from dec2bin to reduce code duplication, especially duplicated code with subtle differences between functions.

The reason is that Matlab's dec2bin allows negative input so we need to do so too, but its dec2base takes only positive inputs, which requires ad hoc checks in dec2bin instead of a single self-consistent check in dec2base that would apply to all bases.

  • Optionally, make dec2hex accommodate fractional inputs (new feature, not essential for the above aims, but would be nice to have if it doesn't get in the way of anything else).

This work won't be completed in time for Octave 8, so this report is to track the activity and collect feedback so it can be ready for Octave 9.

WIP patch attached (only for dec2base so far, not for dec2bin).

Arun Giridhar <arungiridhar>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #53915:  dec2base.patch added by arungiridhar (7KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by arungiridhar (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 project members can vote.

     

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-11-29 jwe CategoryNone Octave Function
    2022-10-27 arungiridhar Attached File- Added dec2base.patch, #53915

    Back to the top


    Powered by Savane 3.9