octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #63282] Make dec2base accept negative and/or f


From: Thibaud Pigeon
Subject: [Octave-bug-tracker] [bug #63282] Make dec2base accept negative and/or fractional inputs
Date: Thu, 23 Feb 2023 05:44:51 -0500 (EST)

Follow-up Comment #1, bug #63282 (project octave):

This is closely related, I did not find another issue mentionning it :


./scripts/strings/dec2hex.m:93  %!assert (dec2hex (-3, 3), "0FD")

Matlab R2020b returns "FFD"


./scripts/strings/dec2bin.m:132 %!assert (dec2bin (-3, 9), "011111101")

Matlab R2020b return "111111101"

While this does not make a lot of sens to represent signed with such bit
count, it may be confusing to pad with 0 instead.

It might be different on latest version of Matlab though.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63282>

_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]