labs

Returns the absolute value of its argument (function or macro)

Local Servers:nonblocking
Remote Servers:N/A
Classification:ANSI
Service:Mathematical Computation

Syntax

  #include <stdlib.h>  
   
  long int labs  (  
     long int   j);
  

Parameters

j
(IN) Specifies the argument for which the absolute value is to be returned.

Return Values

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

Remarks

The labs function or macro returns the absolute value of argument j.

See Also

abs, fabs

Example

  #include <stdlib.h>  
  #include <stdio.h>  
   
  main ()  
  {  
     long x, y;  
     x = -50000L;  
     y = labs (x);  
  }