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

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

[Octave-bug-tracker] [bug #41461] cast to integer type incorrect


From: Mike Sander
Subject: [Octave-bug-tracker] [bug #41461] cast to integer type incorrect
Date: Wed, 05 Feb 2014 11:51:07 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0

Follow-up Comment #2, bug #41461 (project octave):

Michael, I did check.  See
http://octave.1599824.n4.nabble.com/cast-to-char-td4661457.html. 

>From matlab (online) documentation it treats char as unsigned 16 bit value. 
Octave (from what i can determine) treats char as unsigned 8 bit.

this patch removes the undefined result for negative inputs.   It also returns
255 for values > 255, rather than 0.   I believe these changes improve
compatability, within the octave 8 bit char type.

if my arguments above are valid, are there any technical issues with the
checks i have implemented?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41461>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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