"long long" C99 question 
Author Message
 "long long" C99 question

Does "unsigned long long" mean a unsigned data type of at least 64 bits in
C99?

[simple question, answer yes or no, no lengthly flame wars please!]

Thanks,
Tom



Sat, 26 Jun 2004 09:57:16 GMT  
 "long long" C99 question

Quote:
> Does "unsigned long long" mean a unsigned data type
> of at least 64 bits in C99?

Yes.

Quote:
> [simple question, answer yes or no, no lengthly
>  flame wars please!]

C99 5.2.4.2.1 Sizes of integer types:
...
Their implementation-defined values shall be equal or greater in magnitude
(absolute value) to those shown, with the same sign.
...
maximum value for an object of type unsigned long long int
   ULLONG_MAX 18446744073709551615 // 2^64 - 1

--
Simon.



Sat, 26 Jun 2004 10:38:46 GMT  
 "long long" C99 question


Quote:

> > Does "unsigned long long" mean a unsigned data type
> > of at least 64 bits in C99?

> Yes.

> > [simple question, answer yes or no, no lengthly
> >  flame wars please!]

> C99 5.2.4.2.1 Sizes of integer types:
> ...
> Their implementation-defined values shall be equal or greater in magnitude
> (absolute value) to those shown, with the same sign.
> ...
> maximum value for an object of type unsigned long long int
>    ULLONG_MAX 18446744073709551615 // 2^64 - 1

Thank you.

Tom



Sat, 26 Jun 2004 10:52:09 GMT  
 "long long" C99 question


Quote:




> > > Does "unsigned long long" mean a unsigned data type
> > > of at least 64 bits in C99?

> > Yes.

> > > [simple question, answer yes or no, no lengthly
> > >  flame wars please!]

> > C99 5.2.4.2.1 Sizes of integer types:
> > ...
> > Their implementation-defined values shall be equal
> > or greater in magnitude (absolute value) to those
> > shown, with the same sign.
> > ...
> > maximum value for an object of type unsigned long
> > long int
> >    ULLONG_MAX 18446744073709551615 // 2^64 - 1

> Thank you.

> Tom

You can get a copy of the last (?) C99 draft here:

http://anubis.dkuug.dk/JTC1/SC22/WG14/www/docs/n869/



Sat, 26 Jun 2004 12:17:38 GMT  
 "long long" C99 question

Quote:
> Does "unsigned long long" mean a unsigned data type of at least 64 bits in
> C99?

At least 64 *value* bits, and zero or more padding bits.

(A long long of 64 bits, ten of which are padding, would not be a
conforming implementation.)

Quote:
> [simple question, answer yes or no, no lengthly flame wars please!]

Bill, Mu.


Sat, 26 Jun 2004 16:51:11 GMT  
 "long long" C99 question


Quote:
> You can get a copy of the last (?) C99 draft here:

> http://anubis.dkuug.dk/JTC1/SC22/WG14/www/docs/n869/

Even cooler, thanks a bunch!

Tom



Sat, 26 Jun 2004 19:41:16 GMT  
 "long long" C99 question


Quote:

> > Does "unsigned long long" mean a unsigned data type of at least 64 bits
in
> > C99?

> At least 64 *value* bits, and zero or more padding bits.

> (A long long of 64 bits, ten of which are padding, would not be a
> conforming implementation.)

That's what I meant though.... Typically when I mention a type "of n-bits" I
don't mean to say "n-bits, n-k-bits of which are padding".

Just like when I say a 192-bit ECC key I don't mean 64-bits of random values
in the multiplicand and 128 fixed values of padding...

Tom



Sat, 26 Jun 2004 19:42:27 GMT  
 "long long" C99 question
On Tuesday, in article


Quote:



>> > Does "unsigned long long" mean a unsigned data type of at least 64 bits
>in
>> > C99?

>> At least 64 *value* bits, and zero or more padding bits.

>> (A long long of 64 bits, ten of which are padding, would not be a
>> conforming implementation.)

>That's what I meant though.... Typically when I mention a type "of n-bits" I
>don't mean to say "n-bits, n-k-bits of which are padding".

>Just like when I say a 192-bit ECC key I don't mean 64-bits of random values
>in the multiplicand and 128 fixed values of padding...

However padding is part of the definition of C types. It is not, AFAIK,
part of the definition of ECC keys.

--
-----------------------------------------


-----------------------------------------



Thu, 01 Jul 2004 22:17:48 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Define out "long long"?

2. char size (was long long long long long int)

3. short/long/long long Formatting questions

4. long long long long integers

5. Old meaning of "long double" declaration

6. Help with "long double"

7. "Freelance" summary (long)

8. Hash tables with "unsigned long" keys

9. "Double to 2 Unsigned Longs"

10. Using "long double" on NT

11. long source file and "assert"

12. need super "long"!

 

 
Powered by phpBB® Forum Software