mercredi 27 septembre 2017

What exactly is std::labs() there for?

I read about the std::abs() function from using 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 does std::labs()?
  • Where and When I use std::labs()?
  • What is the difference between std::abs() and std::labs()?

Aucun commentaire:

Enregistrer un commentaire