Library Function floor in Math Class
Library Function floor of math.h Header File in C
In this section, we will discuss about library function fabs in math class which is used in C.The C header file math.h contains the standard math library functions that can be used for performing various mathematical operations. The fabs function returns the nearest integer of the argument passed.
Library Function floor of math.h Header File
- In C programming language the floor function is included in math.h header file.
- The range of input argument which is passed to floor function is not limited here as it can be any value such as float or long double also.
Declaration of floor function
double floor(double arg)
Parameters of floor function
The floor function accepts a single input argument which can be a double/float or long double value.
|double or float or long double||This value of double function ranges to all positive and negative numbers.|
Return value of floor function
The floor function returns the nearest integer value of the argument passed.
|Nearest Integer of the argument passed||It returns the value in double/float/long double.|
Implementation of Library Function math.h floor()
The following code shows the use of floor function.
Floor integer of -8.33 = -9
Value1 = 1.0 Value2 = 1.0
Get over 200+ course One Subscription
Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others