On Mon, May 15, 2017 at 7:59 AM, Greg Stark <stark@mit.edu> wrote:
> On 13 May 2017 at 10:29, Robert Haas <robertmhaas@gmail.com> wrote:
>> - Floats. There may be different representations in use on different
>> hardware, which could be a problem. Tom didn't answer my question
>> about whether any even-vaguely-modern hardware is still using non-IEEE
>> floats, which I suspect means that the answer is "no".
>
> Fwiw the answer to that is certainly no. The only caveat is that some
> platforms have not entirely complete implementations of IEEE missing
> corner cases such as denormalized values but I don't think that would
> be something that would be changed with a different hash function
> though.
Well... along with the Intel/IEEE-754 and VAX formats, there is a
third floating point format that is/was in widespread use: IBM hex
float[1]. It's base 16 rather than base 2, and might be the default
on some IBM operating systems[2] for the C float and double types (but
fortunately not xlc for AIX or Linux, and I have no clue about i/OS).
This is probably irrelevant because it looks like people aren't
running PostgreSQL on z/OS right now[3], but unlike VAXen these
systems are alive and well so I just wanted to respond to the
implication on this thread that the whole world is a VAX or an IEEE
system :-) People really use this... I happen to know a shop that has
petabytes of IBM hex float data.
(IBM hardware also supports base 10 floats, but they show up as
different types in C so not relevant.)
[1] https://en.wikipedia.org/wiki/IBM_Floating_Point_Architecture
[2] https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.cbcux01/flotcop.htm#flotcop
[3] https://www.postgresql.org/message-id/flat/BLU437-SMTP4B3FF36035D8A3C3816D49C160%40phx.gbl
--
Thomas Munro
http://www.enterprisedb.com