See https://en.m.wikipedia.org/wiki/Sign_function.
It is useful in certain situations, such as for rational numbers. [ratio.ratio]/2.1:
num shall have the value sign(N) * sign(D) * abs(N) / gcd.
The signature of it should be:
constexpr int sign(floating-point-type x);