Home >>C Tutorial >C Math Function
Mathematical operations can be performed in the C programming by the functions that are defined in <math.h> header file. In order to perform various mathematical operations such as floor(), sqrt(), pow(), ceil() etc there are several methods that are designed in the <math.h> header file.
There are various methods that are defined in the math.h header file that are known to be used commonly. Here are the list of these functions:
Function | Description |
---|---|
ceil(number) | This method generally rounds up the provided number and returns the integer value that is greater than or equal to the provided number. |
floor(number) | This method generally rounds down the provided number and known to return the integer value that is less than or equal to the provided number. |
sqrt(number) | This method generally returns the square root of the provided number. |
pow(base, exponent) | This method is known to return the power of the provided number. |
abs(number) | This method generally returns the absolute value of the provided number. |