
上QQ阅读APP看书,第一时间看更新
2.2.2 浮点型
浮点型表示存储的数据是实数,如3.145。关于浮点型的说明,如表2.2所示。
表2.2 浮点型

常量math.MaxFloat32表示float32能获取的最大值,大约是3.4×1038;常量math.SmallestNonzeroFloat32表示float32能获取的最小值,大约为1.4×10-45。
常量math.MaxFloat64表示float64能获取的最大值,大约是1.8×10308;常量math.SmallestNonzeroFloat64表示float64能获取的最小值,大约为4.9×10-324。