[Scilab-users] {EXT} lcm() output type: how to avoid overflowing and get an actual result?

Dang Ngoc Chan, Christophe Christophe.Dang at sidel.com
Wed Mar 15 17:29:46 CET 2017


Hello,

> De : users [mailto:users-bounces at lists.scilab.org] De la part de Samuel Gougeon
> Envoyé : mercredi 15 mars 2017 17:05
>
> My (slight) preference would be to cast the result always into the decimal class

This sounds reasonable.

But the result could also be converted to the format that is the "closest and suitable" from the input format.

I mean: the user forced a format that is not floating point number for a reason of his/her own;
When it is possible, we should respect this choice.

So if the input is in uint8, the result could be computed in floating point number
then converted to uint8 if possible, or uint# if it is too large, or even kept as floating point number when required.

Don't know how heavy this is on a big matrix (a user probably select uint# to spare memory).

My two cents

regards

--
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