float point number

http://randomascii.wordpress.com/2012/01/23/stupid-float-tricks-2/

http://randomascii.wordpress.com/2012/01/23/stupid-float-tricks-2/


255*2^23+1 positive floats, from +0.0 to +infinity-----IEEE float format 指数部分255时,只能表示正无穷这个个有效float,其他的为无效浮点数字,所以只有一个有效的float point number


For double precision floats you could use _nextafter(x, y) to walk through all of the available doubles----定义好起始浮点数字0,依次循环,上次的结果,作为下一次循环的x


When going from zero to the smallest positive float or from FLT_MAX to infinity the ratio is actually infinite----代表浮点数字的“整型数字的值”增加,作者指出的是“浮点的值”的比率


I have discovered a truly remarkable proof of this theorem which this margin is too small to contain. ----------我发现了这定理的一个绝妙证明但这里的空白太小了,写不下。

in some ranges the exponent lines up such that we may (due to the wobble issues mentioned at the top) waste almost a full bit of precision,----浮点数的指数的编排,丧失1bit的精度,  Ieee754 浮点表示格式,7位精度下 相对误差是x, 如果在某个区间,相对误差达到2x,则2进制表示方法中必然丧失1bit二进制数, 以前使用d个二进制bit,现在只有d-1个二进制bit了,相对误差增大2倍, 相当于把现有2进制的bit 权值扩大2倍,

第一,相对误差增大的exponent都在一个range后面,数值value比较大,相对误差会有变小的趋势

第二,不考虑exponent大的在一个range后面,exponent小的在range一个前面,将某个exponent扩展到整个range,认为此exponent下,尾数均匀分布在一个range中,采用这种

对比方式的话,能够推导出两种exponent需要多少个尾数bit 来表达这个range,进而可以推导出两种exponent下的相对误差的大小,在同一个range内,exponent大的相对误差肯定大于exponent较小的,因为ulp 即最小有效value本身就相差2倍,

The number of mantissa digits needed to exactly print the value of a negative power of two is about N-floor(N*log(2)/log(10)), or ceil(N*(1-log(2)/log(10))) where N is an integer representing how negative our exponent is---------试着进行证明这个公式,2e(-N) x 2e(N) x 10e(N) = 10e(N) 所以, 2e(-N) = 10e(N)/(2e(N) x 10e(N))


The implication of the precision calculations above is that if ‘fStart’ is around 60, then ‘elapsed’ will be a multiple of 3.8 microseconds (two to the negative eighteenth seconds).-------------3.8ms === 2e(-18)还是要掌握英语阿




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值