On 02/21/2015 08:25 PM, Eric Smith wrote:
Having short, int, and long types that occupy 64 bits
of storage but
only effectively have 48 bits of integer value is perfectly fine, but
it does have some consequences that must be considered.
The reason I asked was because of the Seymour Cray/Jim Thornton
philosophy on design. I don't know if this is reflected in the Cray 1,
but it certainly is the case in the CDC 6000-7000 series as well as the
STAR/Cyber 200/ETA-10 line.
The 6000/7000 machines have a long add (60 bit) unit, but no integer
multiply/divide unit--it's possible to perform a multiply or divide
yielding a 60-bit integer, but it's a bit involved and generally not
done. So significance on integers is limited to 48 bits out of 60.
The Cray 1, of course, didn't even have a divide unit--just a "floating
point reciprocal approximation" instruction.
The Cyber/STAR goes a bit farther in not mentioning the word "integer"
at all and divides the 64 bit word into two parts--the exponent/length
high-order part of 16 bits and the significand/index part of 48 bits.
Any integer operations are conducted as "index" operations and the sign
bit is bit 47. Period--no 64 bit integers at all. Bit-logical
operations operate on the entire 64 bit word. Double-precision floating
point is the pretty much the same on both 60 and 64-bit systems--an
upper and lower floating point part, each being a complete floating
point number with exponent. No integers per se.
I know there was a C for the ETA units, but I don't know if a C existed
for the 60-bit machines. But it wouldn't surprise me if it did.
--Chuck