
15 Mar
2007
15 Mar
'07
1:24 p.m.
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