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

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

[Octave-bug-tracker] [bug #63089] dec2bin gives wrong answer for negativ


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #63089] dec2bin gives wrong answer for negative int16
Date: Mon, 24 Oct 2022 13:17:58 -0400 (EDT)

Update of bug #63089 (project octave):

                  Status:                   Fixed => In Progress            
             Open/Closed:                  Closed => Open                   
                 Release:                     dev => 7.2.0                  

    _______________________________________________________

Follow-up Comment #15:

Input validation is broken for `dec2bin` since this change.
E.g.:

>> a.b = 1;
>> dec2bin(a)
error: binary operator '<' not implemented for 'scalar struct' by 'scalar'
operations
error: called from
    dec2bin at line 81 column 7


Also, negative floating-point values are silently truncated(?). According to
the docstring, they should throw an error:

>> dec2bin(-1.5)
ans = 11111110


Re-opening report.



    _______________________________________________________

Reply to this item at:

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

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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