"3.4E +/- 38(7位数字)"到底是什么意思? [英] What exactly does '3.4E +/- 38 (7 digits)' mean?

查看:1325
本文介绍了"3.4E +/- 38(7位数字)"到底是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图了解数据类型的范围.对于非浮点数,这很容易,但是对于浮点数和两倍数,范围列出为:

I'm trying to understand the range of data types. For non-floating point numbers it's easy enough, but then for float and double the ranges are listed as:

浮动:3.4E +/- 38(7位数字)

float: 3.4E +/- 38 (7 digits)

双精度:1.7E +/- 308(15位数字)

double: 1.7E +/- 308 (15 digits)

但是对于外行来说,这到底是什么意思,我该如何利用这些信息?

But in layman, what exactly does that mean, and how can I make use of that information?

推荐答案

The

3.4E +/- 38

表示:

  • float可以代表的最大正值约为3.4e38;
  • 最小正值约为3.4e-38.
  • the largest positive value that a float can represent is about 3.4e38;
  • the smallest positive value is about 3.4e-38.

类似地,负值的范围是-3.4e38到大约-3.4e-38.

Similarly, the range of negative values is from -3.4e38 to about -3.4e-38.

在这里,MeE表示M乘以10到E的幂.

Here, MeE denotes M multiplied by 10 to the E'th power.

The

(7 digits)

表示float可以表示大约七个有效十进制数字.

means that a float can represent approximately seven significant decimal digits.

这些值之所以近似,是因为它们在二进制中是精确的 ,并且每个二进制数都有小数位数.

The reason of these values are approximate is that they are exact in binary, and there's a fractional number of decimal digits for each binary digits.

这篇关于"3.4E +/- 38(7位数字)"到底是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆