双精度数的指数的偏差是1023。
双精度数是以类似的方式编码的,但是它使用52位的尾数和11位的指数来获得更高的精度。
Doubles are encoded in much the same way except that they use a 52-bit mantissa and an 11-bit exponent for higher precision.
指数函数是一个很好的例子,它表明处理有限精度浮点数(而不是无限精度实数)时是需要非常小心的。
The exponential function serves as a good example of how careful you have to be when dealing with limited-precision floating-point Numbers instead of infinitely precise real numbers. ex (Math.exp ).
应用推荐