How can I compute the range of signed and unsigned types
Chris Black
cblack at eragen.com
Wed Apr 18 08:26:33 PDT 2001
On Wed, Apr 18, 2001 at 02:19:11PM +0100, James Cownie wrote:
> All the C standard says is that
>
> 1) sizeof (char) == 1
> 2) sizeof (short) >= sizeof (char)
> 3) sizeof (int) >= sizeof (short)
> 4) sizeof (long) >= sizeof (int)
> 5) sizeof (long long) >= sizeof (long).
>
> It also does not specify that the representation of an int is two's
> complement, so even on machines with the same sizeof(int) the legal
> ranges could differ.
Just out of curiosity, are there any machines currently is use that do
NOT use two's complement? Do IEEE or C standards say anything about the
size of the mantissa in floats?
Chris
-------------- 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/f3c00d03/attachment.sig>
More information about the Beowulf
mailing list