|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-08-04 08:46:17
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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk