Is there a standard sign function (signum, sgn) in C/C++? - Stack Overflow
In general, there is no standard signum function in C/C++, and the lack of such a fundamental function tells you a lot about these languages. Apart from that, I believe both majority viewpoints about the right approach to define such a function are in a w...