0% found this document useful (0 votes)
28 views

Math Funcs

The document describes the math.h header file which contains functions for double precision numbers. It defines common mathematical constants like pi, e, log bases. It also describes functions for absolute values, rounding, exponents, logarithms, trigonometric functions, inverse trigonometric functions, hyperbolic functions, and polynomials. These functions provide basic mathematical operations for use in C programs.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Math Funcs

The document describes the math.h header file which contains functions for double precision numbers. It defines common mathematical constants like pi, e, log bases. It also describes functions for absolute values, rounding, exponents, logarithms, trigonometric functions, inverse trigonometric functions, hyperbolic functions, and polynomials. These functions provide basic mathematical operations for use in C programs.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Th vin <math.

h>: cc hm cho s double


/* Constants rounded for 21 decimals. */
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define

M_E
M_LOG2E
M_LOG10E
M_LN2
M_LN10
M_PI
M_PI_2
M_PI_4
M_1_PI
M_2_PI
M_1_SQRTPI
M_2_SQRTPI
M_SQRT2
M_SQRT_2

2.71828182845904523536
1.44269504088896340736
0.434294481903251827651
0.693147180559945309417
2.30258509299404568402
3.14159265358979323846
1.57079632679489661923
0.785398163397448309616
0.318309886183790671538
0.636619772367581343076
0.564189583547756286948
1.12837916709551257390
1.41421356237309504880
0.707106781186547524401

/* Tr tuyt i */
int
long
double

abs
labs
fabs

(int x);
(long x);
(double x);

/* Ceiling and Floor */


double
double

ceil (double x);


floor (double x);

/* Cn bc 2, ex, logarit, xy, 10p */


double
double
double
double
double
double

sqrt
exp
log
log10
pow
pow10

(double x);
(double x);
(double x);
(double x);
(double x, double y);
(int p);

/* Hm lng gic */
double
double
double

cos
sin
tan

(double x);
(double x);
(double x);

/* Hm lng gic ngc */


double
double
double
double

acos
asin
atan
atan2

(double
(double
(double
(double

x);
x);
x);
y, double x);

//
//
//
//

/* Hm hyperbolic */
double
double
double

cosh
sinh
tanh

arccos(x)
arcsin(x)
arctg(x)
arctg(y/x)

// (ex + e-x)/2
// (ex - e-x)/2
// sinh(x)/cosh(x)

(double x);
(double x);
(double x);

/* Gi tr a thc a[n]*xn + a[n-1]*xn-1 +...+ a[1]*x + a[0] */


double

poly

(double x, int n, double a[]);

tdthu
Khoa CNTT, Trng H Khoa hc t nhin, HQG Tp.HCM

You might also like