float point number

编程入门 行业动态 更新时间:2024-10-28 02:24:07

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

http://randomascii.wordpress/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)还是要掌握英语阿




更多推荐

float point number

本文发布于:2023-06-14 01:30:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1423107.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:float   point   number

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!