About that:
Le 05/08/2014 08:35, A Khorshidi a écrit :
.../...
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).

Scilab wraps integer overflows (200 - 2^8 = -56), whereas Octave saturates. When overflowing an integer, "R" delivers a "NA" value (Not Available). I have no opinion about the best way to deal with integer overflow when designing the language. This kind of topic has been discussed when designing the bitshift() function for Scilab:
http://bugzilla.scilab.org/show_bug.cgi?id=9006#c8

Regards
Samuel

_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to