64 bits integer - ERRATA
Excuse me, when I say "64 bits", I m assuming that the OS are running under a processor with 32 bits only, where "long" type ll have only 32 bits and "double" could has 64 bits, but it isn't a integer, in other hands, I couldn't convert a double to a text string assuming that it is integer with a function like printf().
Then, retrying the question:
Does exist a way or some system call or another thing in Linux that allow us to manipulate integer values larger than a system DWORD (long) ? Samples:
- int64, atoi64(), i64toa(), ...
- int128, atoi128(), i128toa(), ...
Luciano
-------- Mensagem Original --------
Assunto: 64 bits integer
Data: Tue, 09 Nov 2004 22:30:57 -0300
De: Luciano Moreira - igLnx <[email protected]>
Para: linux-c-programming <[email protected]>
How can we do to manipulate integer higher than 32 bits in linux ?
Does exist some system call (or another library), that allow us to do something like as following ?
int64 x;
x = atoi64("12345678901234567890");
char x[21];i64toa(x, sizeof(x));
Thanks,
Luciano
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Luciano Moreira - igLnx
Excuse me, when I say "64 bits", I m assuming that the OS are running under a processor with 32 bits only, where "long" type ll have only 32 bits and "double" could has 64 bits, but it isn't a integer, in other hands, I couldn't convert a double to a text string assuming that it is integer with a function like
printf().
As Mikael said, the "long long" type has 64 bits, even on a 32-bit architecture such as x86.
Quoted 6 lines
Then, retrying the question:
Does exist a way or some system call or another thing in Linux that allow us to manipulate integer values larger than a system DWORD (long) ? Samples:
- int64,atoi64(),i64toa(), ...
- int128,atoi128(),i128toa(), ...
strtoull will parse a 64-bit integer, while printf("%lld", ...) will convert one to a string.
If you want to use integers larger than 64 bits, look into libmp and/or libgmp.
Signature · 1 line
Glynn Clements <[email protected]>