Hi Mehran,
I can't give you any explanation (and I've never really questioned these
points myself) but you may find some sections of these documents
interesting or useful. They both mention integer value ranges.
www.scilab.org/content/download/247/1702/file/introscilab.pdf
page 25
http://wiki.scilab.org/Tutorials?action=AttachFile&do=view&target=Scilab4Matlab.pdf
page 18
Best wishes,
Adrian.
Adrian Weeks
Development Engineer
HID Global,
3 Cae Gwyrdd,
Green Meadow Springs
Business Park,
Cardiff CF15 7AB,
United Kingdom.
+44 (0)29 20528523
(Office)
[email protected]
www.hidglobal.com
From: A Khorshidi <[email protected]>
To: Scilab Users <[email protected]>
Date: 05/08/2014 07:36
Subject: [Scilab-users] Scilab and Matlab integer representation
Sent by: "users" <[email protected]>
Hi;
One reason for using integer type is to save memory space, isn't it?
However, whos() gives us 24 bytes as storage space for both integer and
double data types.
var1 = int8(23); // 1 byte integer representation
whos -name var1
var2 = 23;
whos -name var2
In contrast, Matlab's whos() returns 1 byte for int8 data type and 8 bytes
for double precision number.
And another case,
For values larger than the maximum value of a given integer data type (e.g.
127 for int8) Scilab and Matlab return different values.
For example, Scilab's result for int8(200) is -56 but Matlab's result will
be 127 (the largest value which can be stored in this data type).
Could anyone discuss on these different results returned by Scilab and
Matalb? And specially the source of the differences? Thank you.
Regards,
Mehran
_
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users