RosettaCodeData/Task/Real-constants-and-functions/C/real-constants-and-functions.c
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

12 lines
465 B
C

#include <math.h>
M_E; /* e - not standard but offered by most implementations */
M_PI; /* pi - not standard but offered by most implementations */
sqrt(x); /* square root--cube root also available in C99 (cbrt) */
log(x); /* natural logarithm--log base 10 also available (log10) */
exp(x); /* exponential */
abs(x); /* absolute value (for integers) */
fabs(x); /* absolute value (for doubles) */
floor(x); /* floor */
ceil(x); /* ceiling */
pow(x,y); /* power */