g*********s 发帖数: 1782 | 1 it is said 7-bit significance.
suddenly get confused here. does that mean 30,000,000f and 30,000,001f
actually has the same 32-bit binary representation? |
l*****a 发帖数: 14598 | 2 抠这么细?
去BB都不需要把
【在 g*********s 的大作中提到】 : it is said 7-bit significance. : suddenly get confused here. does that mean 30,000,000f and 30,000,001f : actually has the same 32-bit binary representation?
|
f****4 发帖数: 1359 | 3 可能是要去投行吧,一个交易都是几个B的~
【在 l*****a 的大作中提到】 : 抠这么细? : 去BB都不需要把
|
r*********2 发帖数: 88 | 4 single float 32 bit
23 bit significand |
g*********s 发帖数: 1782 | 5 that's the binary precision.
for decimal, it's log10(2^23) = 7.
【在 r*********2 的大作中提到】 : single float 32 bit : 23 bit significand
|
r*********2 发帖数: 88 | 6 ah, 我错了
对的,尾数一样single precision float就是这个精度吧。 |
n*******0 发帖数: 2002 | 7 如果只能表达这俩数的前7bit的话,那应该是一样的。不过正常的计算机里面除了7bit
significance以外后面通常会多出一坨无意义的bit。考虑到后面这种情况,两个30,
000,000f之间的表示都是有可能不一样的。
【在 g*********s 的大作中提到】 : it is said 7-bit significance. : suddenly get confused here. does that mean 30,000,000f and 30,000,001f : actually has the same 32-bit binary representation?
|
c****o 发帖数: 1280 | 8 In order to understand the precision, it is better to know how float are
stored in memory. Generally, for float number K, the precision is
2^(log_2(k)-23), when K is between 1 and 2, 2^(-23)~10^(-7).
7bit
【在 n*******0 的大作中提到】 : 如果只能表达这俩数的前7bit的话,那应该是一样的。不过正常的计算机里面除了7bit : significance以外后面通常会多出一坨无意义的bit。考虑到后面这种情况,两个30, : 000,000f之间的表示都是有可能不一样的。
|
a********1 发帖数: 750 | 9 64 bit machine上float也还是32吗?比int还小? |
c****o 发帖数: 1280 | 10 try sizeof to test
【在 a********1 的大作中提到】 : 64 bit machine上float也还是32吗?比int还小?
|
|
|
g*********s 发帖数: 1782 | 11 it is said 7-bit significance.
suddenly get confused here. does that mean 30,000,000f and 30,000,001f
actually has the same 32-bit binary representation? |
l*****a 发帖数: 14598 | 12 抠这么细?
去BB都不需要把
【在 g*********s 的大作中提到】 : it is said 7-bit significance. : suddenly get confused here. does that mean 30,000,000f and 30,000,001f : actually has the same 32-bit binary representation?
|
f****4 发帖数: 1359 | 13 可能是要去投行吧,一个交易都是几个B的~
【在 l*****a 的大作中提到】 : 抠这么细? : 去BB都不需要把
|
r*********2 发帖数: 88 | 14 single float 32 bit
23 bit significand |
g*********s 发帖数: 1782 | 15 that's the binary precision.
for decimal, it's log10(2^23) = 7.
【在 r*********2 的大作中提到】 : single float 32 bit : 23 bit significand
|
r*********2 发帖数: 88 | 16 ah, 我错了
对的,尾数一样single precision float就是这个精度吧。 |
n*******0 发帖数: 2002 | 17 如果只能表达这俩数的前7bit的话,那应该是一样的。不过正常的计算机里面除了7bit
significance以外后面通常会多出一坨无意义的bit。考虑到后面这种情况,两个30,
000,000f之间的表示都是有可能不一样的。
【在 g*********s 的大作中提到】 : it is said 7-bit significance. : suddenly get confused here. does that mean 30,000,000f and 30,000,001f : actually has the same 32-bit binary representation?
|
c****o 发帖数: 1280 | 18 In order to understand the precision, it is better to know how float are
stored in memory. Generally, for float number K, the precision is
2^(log_2(k)-23), when K is between 1 and 2, 2^(-23)~10^(-7).
7bit
【在 n*******0 的大作中提到】 : 如果只能表达这俩数的前7bit的话,那应该是一样的。不过正常的计算机里面除了7bit : significance以外后面通常会多出一坨无意义的bit。考虑到后面这种情况,两个30, : 000,000f之间的表示都是有可能不一样的。
|
a********1 发帖数: 750 | 19 64 bit machine上float也还是32吗?比int还小? |
c****o 发帖数: 1280 | 20 try sizeof to test
【在 a********1 的大作中提到】 : 64 bit machine上float也还是32吗?比int还小?
|
r****t 发帖数: 10904 | 21 The earlier discussions in this thread are very confusion. The answer (i
think) is yes to this question. BTW, (i think) "7-bit significance" is 笔误
【在 g*********s 的大作中提到】 : it is said 7-bit significance. : suddenly get confused here. does that mean 30,000,000f and 30,000,001f : actually has the same 32-bit binary representation?
|