How can I compute the range of signed and unsigned types

Jag agrajag at linuxpower.org
Wed Apr 18 05:48:42 PDT 2001


On Wed, 18 Apr 2001, Chris Richard Adams wrote:

> How can I 'compute' the different sizes of types on the machine?  to
> prove that the values within limits.h are valid.  I also would like to
> do this for reals. Anyone have any tips - I'd appreciate it.

Those sizes are defined for the C language.  In order words, no matter
if you're on a 32-bit machine or a 64-bit machine, an int is always
going to be 32-bit and thus have the same numeric range because the
standards say so.  This goes for all the basic types, not just int's.


Jag
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://www.beowulf.org/pipermail/beowulf/attachments/20010418/238bd645/attachment.sig>


More information about the Beowulf mailing list