C Language

fabs function in C

The fabs function in C computes the absolute value of a floating-point number x. The x is the argument that is passed into the fabs(). It is declared in math.h and takes one argument in the form of double and returns the value of type double. Example, Input : 3.5 Output : 3.5 Input : -2.6 Output : […]

fabs function in C Read More »

floor function in C

The floor function in C computes the largest integer value not greater than x. In other words, you can say that the floor function computes the largest integer value not greater than  x. The x is the argument that is passed into the floor(). It is declared in math.h and takes one argument in the form of double

floor function in C Read More »

ceil function in C

The ceil function in C computes the smallest integer value not less than x. In another word, you can say that ceil function computes the smallest integer that is greater than or equal to x. The x is the argument that is passed in the ceil(). It is declared in math.h and takes one argument in

ceil function in C Read More »

pow function in C

The pow function in C computes x raised to the power y (xy). A domain error occurs if x is finite and negative and y is finite and not an integer value. A domain error may occur if x is zero and y is zero. A range error occurs if the magnitude of nonzero finite

pow function in C Read More »

sqrt function in C

The sqrt function in C computes the nonnegative square root of a given number (sqrt parameters). It is declared in math.h and takes one argument in the form of double and returns the value of type double. You should remember that if the argument is less than zero, a domain error occurs. Syntax of sqrt

sqrt function in C Read More »