G
glen herrmannsfeldt
(snip, someone wrote)
Is there a processor built in the last 50 years that doesn't use
all bits zero for floating point zero?
Using a biased exponent, an exponent of zero bits is the smallest
exponent, which a zero should have.
From Blaauw and Brooks "Computer Architecture: Concepts and Evolution"
there are processors with sign magnitude, ones complement, or
twos complement exponents, Some such machines are the IBM 1620,
Ferranti Atlas, CDC 6600, Burroughs B5500, and the CDC STAR-100.
Even so, they could special case zero, which I believe some of
those do. I believe you will only find them running in a museum.
-- glen
| If you don't mind making your code a bit non-portable (and in fact
| systems where 0.0 and NULL *aren't* represented as all-bits-zero are
| rare), then calloc() or memset() can be reasonable. It will at least
| make the initial contents of the allocated memory consistent, even if
| it's not necessarily correct.
As I did not use floats or doubles, I suppose the program is safe.
Is there a processor built in the last 50 years that doesn't use
all bits zero for floating point zero?
Using a biased exponent, an exponent of zero bits is the smallest
exponent, which a zero should have.
From Blaauw and Brooks "Computer Architecture: Concepts and Evolution"
there are processors with sign magnitude, ones complement, or
twos complement exponents, Some such machines are the IBM 1620,
Ferranti Atlas, CDC 6600, Burroughs B5500, and the CDC STAR-100.
Even so, they could special case zero, which I believe some of
those do. I believe you will only find them running in a museum.
-- glen