|
Boost : |
From: Stephan Tolksdorf (andorxor_at_[hidden])
Date: 2007-03-15 09:24:48
Johan RÃ¥de wrote:
> The floating_point_utilities library solves this problem.
> See the documentation of the header nonfinite_num_facets.hpp.
>
> The library also provides portable implementations of fpclassify, isnan,
> signbit etc.
Hi Johan,
What do you think about using the platform signbit and copysign if
available (in TR1, C99, MSVC, ...)? There is a chance that the compiler
optimizes the builtins better than expressions only using arithmetic
primitives. I realize that testing the availability of copysign or
copysign_ is probably difficult to do in the headers only, but for a
subset of platforms it should be feasible.
Regards,
Stephan
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk