[Scilab-users] Overflow convention for integer types

Rafael Guerra jrafaelbguerra at hotmail.com
Fri Feb 23 14:19:54 CET 2018


See some advantages of saturation overflow in article:
https://en.wikipedia.org/wiki/Saturation_arithmetic


-----Original Message-----
From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Stéphane Mottelet
Sent: Friday, February 23, 2018 2:06 PM
To: International users mailing list for Scilab. <users at lists.scilab.org>
Subject: Re: [Scilab-users] Overflow convention for integer types

Le 23/02/2018 à 13:45, Stéphane Mottelet a écrit :
> Hello,
>
> I would like to point out the conventions used by Scilab and Matlab 
> when an integer number is subject to overflow:
>
> Scilab 6.0.1:
>
> --> uint8(255)+1
>  ans  =
>
>   0
>
> Matlab R2017b
>
> >> uint8(255)+1
>
> ans =
>
>   uint8
>
>    255
>
> Do you see any reason in favor of one of each ?
>
> S.
>
>
Maybe monotonicity, but it should be discussed anyway.

S.

--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable Département Génie des Procédés Industriels Sorbonne Universités - Université de Technologie de Compiègne CS 60319, 60203 Compiègne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet

_______________________________________________
users mailing list
users at lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


More information about the users mailing list