exp function in C

The exp function in C computes the base-e exponential of x. A range error occurs if the magnitude of finite x is too large. The x is the argument that is passed into the exp(). It is declared in math.h and takes one argument in the form of double and returns the value of type double.   Syntax

exp function in C Read More »

log2 function in C

The log2 function in C computes the base-2 logarithm of x . A domain error occurs if the argument is less than zero. A pole error may occur if the argument is zero. The x is the argument that is passed into the log2(). It is declared in math.h and takes one argument in the form of double and

log2 function in C Read More »

log10 function in C

The log10 function in C computes the base-10 (common) logarithm of x. A domain error occurs if the argument is negative. A pole error may occur if the argument is zero. The x is the argument that is passed into the log10(). It is declared in math.h and takes one argument in the form of double and returns

log10 function in C Read More »

log function in C

The log function in C computes the base-e (natural) logarithm of x . A domain error occurs if the argument is negative. A pole error may occur if the argument is zero. The x is the argument that is passed into the log(). It is declared in math.h and takes one argument in the form of double and

log function in C Read More »

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 »