Boost logo

Boost :

Subject: Re: [boost] [endian] Testing floating point interoperability
From: Beman Dawes (bdawes_at_[hidden])
Date: 2015-03-20 09:40:22


An exhaustive return-by-value round-trip test of all 4 billion
possible bit patterns for float (but not double) has been run on
Windows with the GCC and Microsoft compilers.

For both compilers in release mode, and for GCC in debug mode, all bit
patterns pass.

But for Microsoft in debug mode, certain bit patterns do not
round-trip correctly. For example, 7f810000 becomes 7fc10000. (Those
are little endian representations).

So what should Boost.Endian do? There is less than two weeks left
before 1.58.0 ships, and even if this turns out to be a bug in the
Microsoft compiler, it is likely to cause user problems.

The most conservative approach is to remove the return-by-value
reverse functions, and note in the docs that only in-place reverse is
available for FP. That will give us more time to determine if
return-by-value endianness reverse is valid for floating point.

Opinions?

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk