[Scilab-users] Bitget for int64/uint64

Samuel Gougeon sgougeon at free.fr
Thu Feb 27 20:31:33 CET 2020


Le 27/02/2020 à 17:44, Jan Åge Langeland a écrit :

> A bit of a waste to use uint64 to store single bits, but that is what 
> bitget does:
>
> --> typeof(bb1)
>  ans  =  "uint64"

This is not worse than returning always decimal numbers 0. and 1.
And better than returning booleans, for u-int8 and u-int16, since a 
boolean is stored on 4 bytes.

By the way, providing a result with the same integer type as the input 
straightforwardly allows many operations between the input and the 
result, if required.

Samuel




More information about the users mailing list