取绝对值

来源:互联网 发布:多开程序软件 编辑:程序博客网 时间:2024/05/15 16:47

int abs(int   i) 返回整型参数i的绝对值     
  double cabs(struct   complex   znum) 返回复数znum的绝对值     
  double fabs(double   x) 返回双精度参数x的绝对值     
  long labs(long   n) 返回长整型参数n的绝对值  

 

 

 

abs,   labs,   llabs,   imaxabs   -   compute   the   absolute   value   of   an   integer.   
    
  SYNOPSIS   
                #include   <stdlib.h>   
    
                int   abs(int   j);   
                long   int   labs(long   int   j);   
                long   long   int   llabs(long   long   int   j);   
    
                #include   <inttypes.h>   
    
                intmax_t   imaxabs(intmax_t   j);

0 0