[Scilab-users] Bitget for int64/uint64
Samuel Gougeon
sgougeon at free.fr
Thu Feb 27 18:10:57 CET 2020
OK, there is a trivial work-around for bitget().
I will post the URL of the fixed macro and how-to fix it for your own
6.1.0 as soon as put on the forge.
I will also add actual examples with integers in the page, and fix minor
typos.
Samuel
Le 27/02/2020 à 17:51, Samuel Gougeon a écrit :
> As suspected, the bug originates from the * operator, that is still
> not reliable between uint64 or int64:
> --> b
> b =
> 230584300921369395*5*
>
> --> b * uint64(1)
> ans =
> 230584300921369395*2*
>
> This was reported in 2018 @ http://bugzilla.scilab.org/15836 and is
> still unfixed.
>
> For bitget, i will see how to do, if there is a workaround. If not, at
> least warn users in the help page.
>
> Samuel
>
> Le 27/02/2020 à 16:58, Samuel Gougeon a écrit :
>> Le 27/02/2020 à 16:17, JLan a écrit :
>>> I wonder if i have misunderstood the documentation for bitget, or if
>>> this is
>>> a bug? It seems to me that numbers > 2^53 are still not handled
>>> correctly.
>>> --> a=uint64(2^61)
>>> a = 2305843009213693952
>>> --> b=uint64(2^61)+1
>>> b = 2305843009213693953
>>
>> bitget(b,1)
>>
>> --> bitget(b,1)
>> ans =
>> 0
>>
>> is a bug.
>> bitget.tst tests int64 and uint64 cases with other inttypes:
>> --> edit SCI\modules\elementary_functions\tests\unit_tests\bitget.tst
>>
>> When bitget() has been extended to 64 bits integers ~3 years ago,
>> several bugs have appeared about the processing of these integers by
>> other Scilab functions, noticeably some functions involved in the
>> bitget implementation.
>> Not all are fixed (actually, only few of them are fixed).
>> But maybe it's another issue here. I could have a look, about this
>> specific case.
>>
>> If you can do other tests and get issues, please report all of them
>> on bugzilla.
>> Thanks
>>
>> _______________________________________________
>> users mailing list
>> users at lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20200227/29d10c24/attachment.htm>
More information about the users
mailing list