Math Functions in C Programing Language

List of Mathematics functions in C program's Math.h


In C and CPP all mathematics functions are performed by using math.h. This file have list of function those functions are listed below.
Functuion-----Description
acos----------inverse cosine
asin----------inverse sine
atan----------one-parameter inverse tangent
atan2---------two-parameter inverse tangent
ceil----------ceiling, the smallest integer not less than parameter
cos-----------cosine
cosh----------hyperbolic cosine
exp-----------exponential function
fabs----------absolute value (of a floating-point number)
floor---------floor, the largest integer not greater than parameter
fmod----------floating-point remainder: x - y*(int)(x/y)
frexp---------break floating-point number down into mantissa and exponent
ldexp---------scale floating-point number by exponent (see article)
log-----------natural logarithm
log10---------base-10 logarithm
modf(x,p)-----returns fractional part of x and stores integral part where pointer p points to
pow(x,y)------raise x to the power of y, xy
sin-----------sine
sinh----------hyperbolic sine
sqrt----------square root
tan-----------tangent
tanh----------hyperbolic tangent

acosh---------inverse hyperbolic cosine
asinh---------inverse hyperbolic sine
atanh---------inverse hyperbolic tangent
cbrt----------cube root
copysign(x,y)-returns the value of x with the sign of y
erf-----------error function
erfc----------complementary error function
exp2(x)-------raise 2 to the power of x, 2x
expm1(x)------one less than the exponential of x, ex − 1
fdim(x,y)-----positive difference between x and y, fmax(x−y, 0)
fma(x,y,z)----multiply and add, (x * y) + z
fmax(x,y)-----largest value of x and y
fmin(x,y)-----smallest value of x and y
hypot(x,y)----hypotenuse, sqrt(x2 + y2)
ilogb---------the exponent of a floating-point value, converted to an int
lgamma--------natural log of the absolute value of the gamma function
llrint--------round to integer (returns long long) using current rounding mode
lrint---------round to integer (returns long) using current rounding mode
llround-------round to integer (returns long long)
lround--------round to integer (returns long)
log1p(x)------natural logarithm of 1 + x
log2----------base-2 logarithm
logb----------extract exponent from floating-point number
nan(s)--------returns NaN, possibly using string argument
nearbyint-----round floating-point number to nearest integer
nextafter(x,y)-returns next representable value after x (towards y)
nexttoward(x,y)-same as nextafter, except y is always a long double
remainder(x,y)--calculates remainder, as required by IEC 60559
remquo(x,y,p)---same as remainder, but store quotient (as int) at target of pointer p
rint------------round to integer (returns double) using current rounding mode
round-----------round to integer (returns double), rounding halfway cases away from zero
scalbln(x,n)----x * FLT_RADIXn (n is long)
scalbn(x,n)-----x * FLT_RADIXn (n is int)
tgamma----------gamma function
trunc-----------truncate floating-point number

j0(x)-----------Bessel function of x of the first kind of order 0
j1(x)-----------Bessel function of x of the first kind of order 1
jn(n,x)---------Bessel function of x of the first kind of order n
scalb(x,y)------x * FLT_RADIXy (x and y are doubles)
y0(x)-----------Bessel function of x of the second kind of order 0
y1(x)-----------Bessel function of x of the second kind of order 1
yn(n,x)---------Bessel function of x of the second kind of order n


Related Topic Java Program to Calculate Mortgage Payments
C Program to Print Pascal Triangle
Javascript Date Object Constructor with Examples
How to Add Multi Language Support in Java
Pagination in JSP Page Example Code

nScraps.com © 2011   Privacy Policy  Terms of Service  Feedback