[Scilab-users] Scilab and Matlab integer representation

Dang, Christophe Christophe.Dang at sidel.com
Tue Aug 5 09:41:04 CEST 2014


Hello,

concerning the second point

> De : A Khorshidi
> Envoyé : mardi 5 août 2014 08:36
>
> 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). 

Such a case should be handled uniformely, which would mean described in a standard.
The only "right" answer would be a special value, indicating the overflow.

Such special values are in the IEEE 754 standard for floating point representation,
but int8  represent few values (256), who would waste one value to implement an error code?

IMHO, this is our responsability as programmers to make sure that we use adapted representations for our values.

-- 
Christophe Dang Ngoc Chan
Mechanical calculation engineer

______________________________________________________________________

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
______________________________________________________________________



More information about the users mailing list