第1个回答 2019-06-21
引用math.h后,即可使用其中定义的常量
M_E。
以下是math.h中定义的一些常量:
/*
Definitions
of
useful
mathematical
constants
*
M_E
-
e
*
M_LOG2E
-
log2(e)
*
M_LOG10E
-
log10(e)
*
M_LN2
-
ln⑵
*
M_LN10
-
ln⑽
*
M_PI
-
pi
*
M_PI_2
-
pi/2
*
M_PI_4
-
pi/4
*
M_1_PI
-
1/pi
*
M_2_PI
-
2/pi
*
M_2_SQRTPI
-
2/sqrt(pi)
*
M_SQRT2
-
sqrt⑵
*
M_SQRT1_2
-
1/sqrt⑵