标准库数据类型和范围
表1为aarch64系统中C标准库定义的数据类型阈值的宏定义和范围。
类型 |
数据类型 |
最小值--宏 |
最小值--值 |
最大值--宏 |
最大值--值 |
---|---|---|---|---|---|
8u |
uint8_t |
- |
0 |
UINT8_MAX |
255,即28-1 |
8s |
int8_t |
INT8_MIN |
-INT8_MAX - 1,即-27 |
INT8_MAX |
127,即27-1 |
16u |
uint16_t |
- |
0 |
UINT16_MAX |
65535,即216-1 |
16s |
int16_t |
INT16_MIN |
-INT16_MAX - 1,即-215 |
INT16_MAX |
32767,即215-1 |
16f |
float16_t |
FLT16_MIN |
6.10351562500000000000000000000000000e-5F16 |
FLT16_MAX |
6.55040000000000000000000000000000000e+4F16 |
32u |
uint32_t |
- |
0 |
UINT32_MAX |
4294967295U,即232-1 |
32s |
int32_t |
INT32_MIN |
-INT32_MAX - 1,即-231 |
INT32_MAX |
2147483647,即231-1 |
32f |
float |
FLT_MIN |
1.17549435082228750796873653722224568e-38F |
FLT_MAX |
3.40282346638528859811704183484516925e+38F |
64s |
int64_t |
INT64_MIN |
-INT64_MAX - 1,即-263 |
INT64_MAX |
9223372036854775807L,即263-1 |
64f |
double |
DBL_MIN |
2.22507385850720138309023271733240406e-308L |
DBL_MAX |
1.79769313486231570814527423731704357e+308L |