Boost logo

Boost :

Subject: [boost] [endian] Floating point reversal return by value concerns
From: Beman Dawes (bdawes_at_[hidden])
Date: 2015-03-18 07:36:59


On Mon, Jan 26, 2015 at 11:25 PM, Cliff Green <cliffg_at_[hidden]> wrote:
>
> ..., I do have concern about one aspect of the new functionality (or
> maybe I didn't read deep enough in the docs) - floating point endian
> reversal functions which return by value.
>
> Unless something has significantly changed in the last few years, swapping
> and returning floating point values is likely to silently change bits for
> certain bit patterns / values. In particular, returning by value will
> normalize some values (I assume as part of loading or accessing the value
> into floating point CPU registers). There may be other floating point
> characteristics that silently change the bits dealing with NaN and infinity
> values (but I'm far from an expert on floating point computations).

Could you please provide code for one or more return-by-value test
cases that fail because the value gets normalized?

I'm really hesitant to change anything without having test cases to
work with. That would also help with documenting the specifics of the
problem.

Thanks,

--Beman


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