golang基础数据类型-浮点型
最新推荐文章于 2024-02-19 23:22:49 发布
Go语言提供float32和float64两种浮点数类型,float32精度约为6个十进制数,float64为15个。一般推荐使用float64以避免计算误差。float32由于有效位限制,对于大于23位的整数表示会有误差。math包包含浮点数的边界值操作。
摘要由CSDN通过智能技术生成