1
starfish 2014-08-15 00:57:12 +08:00
本来想直接给你解释,但写了一大堆东西后发现解释起来比较麻烦,所以请自行参考下列网页:
http://en.wikipedia.org/wiki/Binary32 http://babbage.cs.qc.cuny.edu/IEEE-754.old/References.xhtml |
2
bcxx 2014-08-15 01:02:45 +08:00
额你 e 是 8 位那肯定是 127 啊……(为啥是 127 这个就要解释移码这玩意的作用了
|
5
bcxx 2014-08-15 09:40:17 +08:00
@hazard 是 2^(n - 1) - 1 啦 http://en.wikipedia.org/wiki/Exponent_bias
> By arranging the fields so that the sign bit is in the most significant bit position, the biased exponent in the middle, then the mantissa in the least significant bits, the resulting value will be ordered properly, whether it's interpreted as a floating point or integer value. This allows high speed comparisons of floating point numbers using fixed point hardware. 大概用这句就能解释了吧? |