In article <11**********************@g49g2000cwa.googlegroups .com>,
siliconwafer <sp*********@yahoo.com> wrote:
"what about the Hardware...Doesn't it maily rely on that...? "
Which H/W *exactly* decides this?Is it the data width of memory where
the compiler stores the variables? OR is it the CPU regesters?
Reply
MyAnswer?
Oh, I thought your question was rhetorical.
For the same hardware and the same OS, there might be several
compiler options that lead to different type sizes. Not all
of those are necessarily going to be implemented as pure hardware
operations. A 128 bit "long long" on a machine with 64 bit
registers might be processed through library calls or through
standard multi-precision techniques for simpler operations.
Integral type sizes chosen for a particular combination of
hardware + OS + compiler + flags
will -usually- involve a power-of-2 multiplied by the native
operation size, as those sizes are usualy easier to program.
Floating point type sizes, if not using the native size, are
more likely to be reliant on the politics of whatever the IEEE
committee has defined.
In any case, operation sizes supported will be strongly
influenced by marketting considerations. If your potential
customer is the National Weather Office, and they tell you
they want a 240 bit float synthesized from three 80-bit registers,
and they say, "We have $47 million for this project if you can
install 3 of them before the next hurricane season", then
you answer "Yes, certainly", not "But our longest hardware
register is only 64 bits."
--
"It is important to remember that when it comes to law, computers
never make copies, only human beings make copies. Computers are given
commands, not permission. Only people can be given permission."
-- Brad Templeton