|
| From: | Michael Godfrey |
| Subject: | [Octave-bug-tracker] [bug #41461] cast to integer type incorrect |
| Date: | Wed, 05 Feb 2014 03:27:15 +0000 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0 |
Follow-up Comment #1, bug #41461 (project octave):
In cases like this it is appropriate
to check for matlab behavior before making
proposals no matter how "reasonable" they may
seem.
Matlab (R2009B) says:
>> x=int8(-128)
x =
-128
>> z=char(x)
Warning: Out of range or non-integer values truncated during conversion to
character.
z =
>> x=256
x =
256
>> z=char(x)
z =
>> single(z)
ans =
256
>>
====================
So, your suggestions will introduce further
Matlab incompatibility. It is not clear why
Matlab seems to think that 256 is within char range.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?41461>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
| [Prev in Thread] | Current Thread | [Next in Thread] |