In the past we have been using Visual Studio's _fpclass to understand if an infinite was positive or negative: http://msdn.microsoft.com/en-us/library/aa246882%28v=vs.60%29.aspx
Passing to std::fpclassify, there's no distinction anymore between positive and negative infinite: http://en.cppreference.com/w/cpp/numeric/math/fpclassify
Can I safely check the sign of infinite with one of the methods here?
Is there a standard sign function (signum, sgn) in C/C++?
Note:
- Independently if fastmath is enabled
- In a portable way
Note 2:
- C++11 is applicable