short vs. long

Norman Diamond diamond at diamond.csl.sony.junet
Tue May 23 12:13:10 AEST 1989


In article <19.UUL1.3#5077 at aussie.UUCP> rex at aussie.UUCP (Rex Jaeschke) posted:

>>"... the range of values of 
>>each type [signed char, short, int, long] is a subrange of the values 
>>of the next type in the list."

In article <160 at mountn.dec.com> minow%thundr.dec at decwrl.dec.com (Martin Minow) writes:

>Not to be picky, but the *range* of a value is not necessarily the same
>thing as its storage requirement.  For example, on a Vax computer, float
>and double have the same range, but different size (and different precision).

>Or, am I reading the standard *too* carefully?

I believe "subrange" is to be interpreted like "subset", meaning that it
"usually" might have fewer elements but might be exactly the same.  It's
perhaps a matter of reading too carelessly (sorry, but you asked).

Incidentally, to pick nits, double has a very slightly larger range than
float.

--
Norman Diamond, Sony Computer Science Lab (diamond%csl.sony.co.jp at relay.cs.net)
  The above opinions are my own.   |  Why are programmers criticized for
  If they're also your opinions,   |  re-implementing the wheel, when car
  you're infringing my copyright.  |  manufacturers are praised for it?



More information about the Comp.std.c mailing list