[Scilab-users] How to print int64 or uint64 integers at full accuracy?

Rafael Guerra jrafaelbguerra at hotmail.com
Mon Aug 29 12:34:32 CEST 2016


Hello,

I have tried Tim's nice kludge but with no success.
A different attempt using "modulo" failed too:

i = int64(2)^62 + 1;
s = "";
j = i;
b = int64(10);
while (j >= 1)
    dj = int(modulo(j,b));
    s = s + string(dj);
    j = j/b;
end
s = strrev(s);
printf("64-bit integer - string: %s\n", s)
printf("64-bit integer - true:   4611686018427387905\n")


It is indeed puzzling and troublesome that a number can be correctly output to Scilab's console but not to a string or a file...
Cheers,
Rafael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160829/55adf848/attachment.htm>


More information about the users mailing list