<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Le 29/08/2016 09:46, Jan Åge Langeland
      a écrit :<br>
    </div>
    <blockquote
      cite="mid:321bf67f-b693-cede-d03d-a99a8213eefb@online.no"
      type="cite">
      <meta content="text/html; charset=windows-1252"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">On 29.08.2016 02:09, Tim Wescott
        wrote:<br>
      </div>
      <blockquote cite="mid:1472429361.3023.62.camel@Servo" type="cite">
        <pre wrap="">A kludge would be to make it into two integers. 
</pre>
      </blockquote>
      <br>
      Each case may not be so complex to work around, but in total it
      seems like Scilab 6 is not yet well prepared for int64 and uint64.<br>
      <br>
      For instance  %x and %o need to be handled too, functions like
      dec2bin() and dec2hex() should work - etc.<br>
      <br>
      Generally a lot of caution is needed when using these 64 bit
      integers.  Example:<br>
      <pre class="bz_comment_text" id="comment_text_5" style="font-size: small; font-family: monospace; white-space: pre-wrap; width: 1003px; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">--> int64(2^62+256+1) //loss of prescision
 ans  =
  4611686018427387904</pre>
    </blockquote>
    Yes, but this loss is expected, since 2^62+256+1 is performed with
    decimal encoding.<br>
    It is a case similar to the classical 1+ %eps/2<br>
    It is not a bug.<br>
    For dec2*(): int64 encoding is already supported, and a clear error
    message is yielded for input integers > 2^52<br>
    <br>
    <tt>--> dec2bin(int64(2^52))</tt><tt><br>
    </tt><tt> ans  =</tt><tt><br>
    </tt><tt> 10000000000000000000000000000000000000000000000000000</tt><tt><br>
    </tt><tt><br>
    </tt><tt>--> dec2bin(int64(2^53))</tt><tt><br>
    </tt><tt>at line    12 of function dec2bin (
      SCI\modules\elementary_functions\macros\dec2bin.sci line 43 )</tt><tt><br>
    </tt><tt>dec2base: Wrong value for input argument #1: Must be
      between 0 and 2^52.</tt><tt><br>
    </tt><br>
    So, there is still a limitation, but it is clearly stated. At least,
    integers from 2^33 to 2^52 are newly supported :)<br>
     <br>
    Samuel<br>
    <br>
  </body>
</html>