
4 Aug
2006
4 Aug
'06
12:46 p.m.
Johan RĂ¥de wrote:
Do you think that
inline bool signbit(float x) { // check that signbit_mask contains at most one 1 bit BOOST_ASSERT(!(signbit_mask & (signbit_mask - 1))); return binary_cast<boost::uint32_t>(x) & signbit_mask; }
is a good idea?
The unit tests of signbit should be enough to determine whether it works on a particular platform.