I read about the std::abs() function when browsing cppreference.
On that page I have also seen a std::labs() function. Which has the same prototype as one of the std::abs() overloads (the one for long).
long abs( long n );
long labs( long n );
and
long long abs( long long n );
long long llabs( long long n );
So,
- What exactly
std::labs()does? - Where and when do I use
std::labs()? - What is the difference between
std::abs()andstd::labs()?