Boost logo

Boost :

Subject: Re: [boost] [endian] Some suggestions
From: Peter Dimov (lists_at_[hidden])
Date: 2016-04-12 08:28:44


Bjorn Reese wrote:
> On 04/11/2016 01:47 AM, Gavin Lambert wrote:
>
> > While that's true, surely any compiler/library should treat any NaN bit
> > pattern as returning true from isnan() and friends, even if it is not
> > bit-identical to the NaN that the compiler/library would generate
> > itself.
>
> Correct, arithmetic and relational operations disregard the NaN payload;
> that is by design. If, however, you use the NaN payload to convey
> information, such as errors or diagnostics, then the compiler generated
> payloads can cause interoperability problems.

That's true but I still don't see why the Endian library has anything to do
with it. Its job is to put back the bits in your float the way they were
written; if the compiler then replaces the bits with something else, there's
nothing the library can do. The library should give you a float that is the
same as the hex float literal with the same bits that were written; it could
do nothing more.


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