Поделиться через


labs

Calculates the absolute value of a long integer.

long labs(
      long n 
);

Параметры

  • n
    Long-integer value.

Возвращаемое значение

The labs function returns the absolute value of its argument. There is no error return.

Требования

Routine

Required header

labs

<stdlib.h> and <math.h>

For additional compatibility information, see Compatibility in the Introduction.

Libraries

All versions of the C run-time libraries.

Пример

See the example for abs.

Эквивалент в .NET Framework

System::Math::Abs

См. также

Основные понятия

Data Conversion

Floating-Point Support

abs, _abs64

_cabs

fabs, fabsf