Le 19/09/2018 à 11:24, Stéphane Mottelet a écrit :
Le 19/09/2018 à 11:17, Samuel Gougeon a écrit :

The current implementation is not incoherent.
However, there are still bugs, and when trying to solve them, the question of incoherence raises. See e.g :

--> int8(-128)/int8(-1)
 ans  =
 -128

There is no bug here. The division yields 128, that then is wrapped, what yields -128, since in Scilab after the int8 127, 127+1 goes to -128 instead of ceiling to 127 like in Octave:
>> int8(-128)/int8(-1)
ans = 127

At first sight, Octave's result does not look more consistent than Scilab's one.
But following its own ceiling/flooring rules, yet it is consistent.

With both possible rules, wrapping or saturating ones, results may appear as inconsistent. But for this example, it is not the case.

Samuel

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

Reply via email to