- include<math.h>
- int abs (int val); 取整形絕對值函數(shù) ;
- float fabs (float val); 取浮點型數(shù)字絕對值函數(shù);
- long labs (long val); 取長整形絕對值函數(shù) ;
- char cabs (char val); 取字符形絕對值函數(shù) ;
- float atan2 (float y,float x); 求X/Y的arctangent值;
- float atan (float x);。。。。。
- float acos (float x);。。。。。
- float asin (float x);。。。。。
- float atof (void *string);把字符串轉換成浮點型值"1.23"->1.23,f代表float;
- int atoi;。。。。。。。。。"123"->123;
- long atol;。。。。。。。。。"6556523"->6556523;
- void *memccpy (void *dest, /* destination buffer */
- void *src, /* source buffer */
- char c, /* character which ends copy */
- int len); /* maximum bytes to copy */將一個字符串拷貝到另一個字符串中直到考完字符c或者len的長度為止
- char memcmp (void *buf1, /* first buffer */
- void *buf2, /* second buffer */
- int len); /* maximum bytes to compare */比較兩個字符串的大小,buf1>buf2返回1.........
- void *memchr (void *buf, /* buffer to search */
- char c, /* byte to find */
- int len); /* maximum buffer length */在字符串中的前l(fā)en個字符中查詢字符c,并返回該字符指針
- #include <stdlib.h>
- void *calloc (unsigned int num, /* number of items */
- unsigned int len);創(chuàng)建一個含有num個長度為len的元素陣列,
- void free (void xdata *p);釋放指針函數(shù)
- void init_mempool (void xdata *p, /* start of memory pool */
- unsigned int size); /* length of memory pool */創(chuàng)建一塊內存區(qū)以便使用
- void *realloc (void xdata *p, /* previously allocated block */
- unsigned int size); /* new size for block */將已經創(chuàng)建的內存擴大到新的size,但沒有足夠的內存擴大時該函數(shù)失效
- void *malloc (unsigned int size); /* block size to allocate */創(chuàng)建一段長度為size的內存使用
- float ceil (float val);計算出val數(shù)字的最小的不小于該數(shù)的整數(shù),但類型仍為float型
- float floor (float val); 和上面的相反,最大的不大于該書的整數(shù)
復制代碼
|