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@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


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

Reply via email to