<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hello Jan,</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">You will find <a
moz-do-not-send="true"
href="https://codereview.scilab.org/cat/21421%2C2%2Cscilab/modules/elementary_functions/macros/bitget.sci">=>
there</a> a fixed version of bitget() for big u-int64 integers.<br>
You can patch your Scilab 6.1.0 installation in the following way:</div>
<div class="moz-cite-prefix">
<ul>
<li>download and unzip the file. rename it bitget.sci</li>
<li>put bitget.sci in the SCI/elementary_functions/macros
directory</li>
<li>Run the following Scilab code in the console:<br>
cd SCI/elementary_functions/macros<br>
predef clear<br>
genlib elementary_functionslib<br>
clear bitget</li>
</ul>
And then test and use bitget in the current session and all
forthcoming ones.<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Regards<br>
Samuel<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Le 27/02/2020 à 16:17, JLan a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:1582816645238-0.post@n3.nabble.com">
<pre class="moz-quote-pre" wrap="">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(a,1:64)
ans =
column 1 to 32
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0
column 33 to 64
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0
--> bitget(b,1:64)
ans =
column 1 to 32
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0
column 33 to 64
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0
</pre>
</blockquote>
<br>
</body>
</html>