text stringlengths 0 99.6k |
|---|
----------------- |
-------------------------------------- |
abs, fabs - absolute value |
abs(i) |
int i; |
fabs(f) |
float f; |
abs and fabs return the absolute value |
of their arguments |
-------------------------------------- |
atoi, atof - convert strings to numbers |
atoi(iptr) |
char *iptr; |
float atof(fptr) |
char *fptr; |
atoi converts the string pointed to by |
its argument into an integer |
atof converts the string pointed to by |
its argument into a float quantity |
both functions ignore leading spaces |
--------------------------------------- |
bcmp, bcopy, bzero, ffs - bit and byte |
string functions |
bcmp(p1, p2, len) |
char *p1, *p2; |
bcopy(p1, p2, len) |
char *p1, *p2; |
ffs(i) |
int i; |
bcmp compares len bytes of the strings |
p1 and p2 and returns zero if they are |
the same, none-zero otherwise |
bcopy copies len bytes from string p1 |
to string p2 |
bzero fills string p with len zeros |
ffs returns the position of the first |
set bit in its argument. bits are |
numbered starting at one. if the |
argument is zero ffs returns -1 |
-------------------------------------- |
exit, abort - terminate execution |
exit() |
abort() |
exit and abort end program execution. |
all files opened by fopen are closed |
-------------------------------------- |
exp, log, log10, pow, sqrt - assorted |
math functions |
#include <math.h> |
float exp(x) |
float x; |
float log(x) |
float x; |
float log10(x) |
float x; |
float pow(x, y) |
float x, y; |
float sqrt(x) |
float x; |
exp returns e**x |
log returns the natural logarithm of x |
log10 returns base 10 logarithm of x |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.