cps是什么单位| 铁蛋白偏低是什么意思| 兔子怕什么| 十玉九裂是什么意思| 海啸是什么意思| 风邪是什么| 奇货可居是什么意思| 蓝颜知己是什么关系| 后背痒是什么原因| 无大碍是什么意思| 床垫什么样的好| 舌苔发白是什么症状| 李子树苗什么品种好| 梦见牙碎了是什么预兆| 精神洁癖是什么| 一只脚心疼是什么原因| 脸颊为什么会凹陷| 胃疼检查什么项目| 7月12日什么星座| 完美落幕是什么意思| 唯我独尊是什么生肖| 左卵巢内囊性结构什么意思| 草字头加弓念什么| 医院五行属什么| 献血之后吃什么比较好| 九分裤配什么鞋| 手麻挂什么科| 茯苓有什么作用和功效| 葡萄糖粉适合什么人喝| 眼睛肿了用什么药| 空腹喝酒有什么危害| 里正是什么官| 农历10月22日是什么星座| 00后是什么意思| 入定是什么意思| 小孩子肚子疼吃什么药| 女人为什么会患得患失| 什么是偏印| 虽败犹荣是什么意思| 4.13什么星座| 糖尿病人可以吃什么零食| 吃什么可以化痰| geya是什么牌子的手表| 现在什么餐饮最火| 墨鱼干和什么煲汤最好| 热闹的什么| 共振是什么意思| 属蛇的贵人是什么属相| 男生为什么会勃起| 榴莲为什么是苦的| 支气管舒张试验阳性是什么意思| 蕴字五行属什么| 惊涛骇浪什么意思| 脾虚湿蕴证是什么意思| 医生说忌辛辣是指什么| 葡萄又什么又什么| 血管痉挛吃什么药| 今年清明节有什么讲究| 阿托品是什么药| 减肥吃什么坚果| 摘胆对身体有什么影响| 白带有腥味是什么原因| 小叶增生吃什么药| 猕猴桃树长什么样| 7.31什么星座| 宝宝细菌感染吃什么药| 肌酐是什么| 抗着丝点抗体阳性是什么| 唇腺活检主要是看什么| 什么是海市蜃楼| 什么样的白带是怀孕了| 什么人容易得眩晕症| 铉是什么意思| 白头发吃什么可以改善| 什么是拿铁| 梦见西红柿是什么预兆| 加白是什么意思| 女人肾虚是什么原因| 待客是什么意思| 42岁属什么| 11月29号什么星座| 嗯嗯什么意思| 为什么晚上不能倒垃圾| comeon什么意思| 养肝护肝吃什么食物好| 急是什么结构| 生猴子是什么意思| 羊和什么属相最配| 肚子左边疼是什么原因| 六月初六是什么节| 快乐是什么意思| 枇杷什么味道| 舌头上有齿痕是什么原因| 大明湖畔的夏雨荷是什么意思| 唐伯虎是什么生肖| 头皮屑多用什么洗发水效果好| 年轻人创业做什么好| p是什么意思医学| 东吴是现在的什么地方| 医保统筹支付什么意思| 南柯一梦是什么意思| 吃维生素b有什么好处| 胸前骨头疼是什么原因| 解酒喝什么好| 头发白缺什么| 为什么会耳鸣| 妖艳是什么意思| 黄毛什么意思| 吃完狗肉不能吃什么| 右上眼皮跳是什么预兆| 健康证什么时候可以办| 午时左眼跳是什么兆头| 茭头是什么| 肌酐低是什么问题| 木糖醇是什么| 珍珠五行属什么| 落井下石是什么意思| 开塞露加什么能去皱纹| 4月5日是什么星座| 小腹胀胀的是什么原因| 头出汗是什么原因| 地球绕着什么转| 谷子是什么意思| 公立医院和私立医院有什么区别| 带环了月经推迟不来什么原因| lee属于什么档次| 收缩压偏高是什么意思| 明目张胆是什么生肖| 惊厥是什么原因引起的| 濑粉是什么| 月亮象征着什么| 物是人非什么意思| 地米是什么药| 什么的面目| 爱放屁吃什么药| 竖心旁的字和什么有关| 空调健康模式是什么意思| 酒量越来越差什么原因| 带刺的玫瑰是什么意思| 带状疱疹什么不能吃| 请问支气管炎吃什么药最有效| 明天叫什么日| 小孩咳嗽挂什么科| miko是什么意思| 蓝眼睛的猫是什么品种| 熟练的反义词是什么| 肝不好吃什么| 乳房结节是什么原因引起的| 蛇毒有什么用| 党参不能和什么一起吃| 胃不好的人吃什么养胃| 剑桥英语和新概念英语有什么区别| 做梦搬家是什么意思| 属猪适合佩戴什么饰品| 三餐两点什么意思| 什么的山谷| 土豆和什么不能一起吃| 肌无力挂什么科| 青蛙怕什么| 什么东西解腻| 霍山黄芽属于什么茶| 来月经为什么会肚子痛| 可可和咖啡有什么区别| 牙周炎吃什么药最好| 便秘吃什么好| 百褶裙搭配什么上衣| 沉冤得雪是什么意思| 平板有什么用处| rm是什么位置| 牙齿松动是什么原因引起的| 西瓜有什么营养| omega3是什么| 榴莲皮可以做什么| 头晕没精神是什么原因| 千里共婵娟什么意思| 外阴瘙痒用什么药膏| 怀孕第一个月有什么特征| 宝宝佛适合什么人戴| 内消瘰疬丸主治什么病| 过敏性紫癜吃什么药| 夏季吃什么菜| 张力是什么意思| 怪力乱神是什么意思| 夏天怕热冬天怕冷是什么体质| 蓝色预警是什么级别| 喝酒后手麻是什么原因| 椁是什么意思| 左边太阳穴疼是什么原因| 久而久之下一句是什么| 喜大普奔什么意思| 躺枪是什么意思| 刚怀孕需要注意什么| 假如时光倒流我能做什么| 脑血栓前兆是什么症状表现| 台风什么时候到上海| 已读不回是什么意思| 医的笔顺是什么| 颈动脉彩超能查出什么| 什么茶解酒效果比较好| 更年期出汗吃什么药| 天方夜谭是什么意思| x线检查是什么| 买二手苹果手机要注意什么| 教师节送老师什么礼物最好| 尿结石有什么症状| 胆道闭锁有什么症状| 尿道炎用什么药| 久咳不愈是什么原因| 去除扁平疣用什么药膏| 什么是矫正视力| 优思悦是什么药| 妨夫是什么意思| 策划是干什么的| 什么是鸡皮肤图片| 胆囊炎吃什么药效果最好| 胸有成竹什么意思| 脸上长扁平疣是什么原因引起的| 十二月十二日是什么星座| 滑肠是什么意思| 青睐是什么意思| rf医学上是什么意思| 旺是什么生肖| 康熙叫什么名字| 什么手机拍照好看| 睡久了腰疼是什么原因| 人次是什么意思| 蓝莓什么时候成熟| 拔牙后可以吃什么| 多喝酸奶有什么好处| 中度贫血吃什么补血最快| 抗坏血酸是什么意思| 骶椎隐裂是什么意思| 小狗可以吃什么| 什么是细胞| 大庭广众什么意思| fashion是什么意思| 枸杞泡酒有什么作用和功效| 卯戌相合发生什么| 什么是肿瘤| 藿香正气水什么牌子的好| 蛀牙的早期症状是什么| 煞是什么意思| 左脸颊长痘是什么原因| 隔离霜和粉底液有什么区别| cr是什么金属| 11月29是什么星座| pass掉是什么意思| 心眼是什么意思| 兽医是什么专业| 龙珠是什么| 什么能减肚子上的脂肪| 荷兰机场叫什么| 今年夏天为什么这么热| 浅表性胃炎吃什么药好| 438是什么意思| 云南有什么| 青春期什么时候结束| 萝卜丁口红什么牌子| 炙热是什么意思| ggdb是什么牌子| 扁桃体发炎看什么科| 双向情感障碍吃什么药| 肚子有腹水是什么症状| 肛瘘是什么症状| 百度

成都航空公司召开干部大会 查光忆任总经理(图)

百度 49股目标涨幅超两成41亿主力资金抢筹2018-03-2508:36来源:数据宝证券时报股市大数据新媒体“数据宝”统计,近十个交易日共有337只个股被机构评级为买入,其中241股给出目标价位,63只具有超过50%的上升空间,目标涨幅翻倍的个股有2只。

Single-precision floating-point format (sometimes called FP32 or float32) is a computer number format, usually occupying 32 bits in computer memory; it represents a wide dynamic range of numeric values by using a floating radix point.

A floating-point variable can represent a wider range of numbers than a fixed-point variable of the same bit width at the cost of precision. A signed 32-bit integer variable has a maximum value of 231 ? 1 = 2,147,483,647, whereas an IEEE 754 32-bit base-2 floating-point variable has a maximum value of (2 ? 2?23) × 2127 ≈ 3.4028235 × 1038. All integers with seven or fewer decimal digits, and any 2n for a whole number ?149 ≤ n ≤ 127, can be converted exactly into an IEEE 754 single-precision floating-point value.

In the IEEE 754 standard, the 32-bit base-2 format is officially referred to as binary32; it was called single in IEEE 754-1985. IEEE 754 specifies additional floating-point types, such as 64-bit base-2 double precision and, more recently, base-10 representations.

One of the first programming languages to provide single- and double-precision floating-point data types was Fortran. Before the widespread adoption of IEEE 754-1985, the representation and properties of floating-point data types depended on the computer manufacturer and computer model, and upon decisions made by programming-language designers. E.g., GW-BASIC's single-precision data type was the 32-bit MBF floating-point format.

Single precision is termed REAL(4) or REAL*4 in Fortran;[1] SINGLE-FLOAT in Common Lisp;[2] float binary(p) with p≤21, float decimal(p) with the maximum value of p depending on whether the DFP (IEEE 754 DFP) attribute applies, in PL/I; float in C with IEEE 754 support, C++ (if it is in C), C# and Java;[3] Float in Haskell[4] and Swift;[5] and Single in Object Pascal (Delphi), Visual Basic, and MATLAB. However, float in Python, Ruby, PHP, and OCaml and single in versions of Octave before 3.2 refer to double-precision numbers. In most implementations of PostScript, and some embedded systems, the only supported precision is single.

IEEE 754 standard: binary32

edit

The IEEE 754 standard specifies a binary32 as having:

This gives from 6 to 9 significant decimal digits precision. If a decimal string with at most 6 significant digits is converted to the IEEE 754 single-precision format, giving a normal number, and then converted back to a decimal string with the same number of digits, the final result should match the original string. If an IEEE 754 single-precision number is converted to a decimal string with at least 9 significant digits, and then converted back to single-precision representation, the final result must match the original number.[6]

The sign bit determines the sign of the number, which is the sign of the significand as well. "1" stands for negative. The exponent field is an 8-bit unsigned integer from 0 to 255, in biased form: a value of 127 represents the actual exponent zero. Exponents range from ?126 to +127 (thus 1 to 254 in the exponent field), because the biased exponent values 0 (all 0s) and 255 (all 1s) are reserved for special numbers (subnormal numbers, signed zeros, infinities, and NaNs).

The true significand of normal numbers includes 23 fraction bits to the right of the binary point and an implicit leading bit (to the left of the binary point) with value 1. Subnormal numbers and zeros (which are the floating-point numbers smaller in magnitude than the least positive normal number) are represented with the biased exponent value 0, giving the implicit leading bit the value 0. Thus only 23 fraction bits of the significand appear in the memory format, but the total precision is 24 bits (equivalent to log10(224) ≈ 7.225 decimal digits) for normal values; subnormals have gracefully degrading precision down to 1 bit for the smallest non-zero value.

The bits are laid out as follows:

 

The real value assumed by a given 32-bit binary32 data with a given sign, biased exponent E (the 8-bit unsigned integer), and a 23-bit fraction is

 ,

which yields

 

In this example:

  •  ,
  •  ,
  •  ,
  •  ,
  •  .

thus:

  •  .

Note:

  •  ,
  •  ,
  •  ,
  •  .

Exponent encoding

edit

The single-precision binary floating-point exponent is encoded using an offset-binary representation, with the zero offset being 127; also known as exponent bias in the IEEE 754 standard.

  • Emin = 01H?7FH = ?126
  • Emax = FEH?7FH = 127
  • Exponent bias = 7FH = 127

Thus, in order to get the true exponent as defined by the offset-binary representation, the offset of 127 has to be subtracted from the stored exponent.

The stored exponents 00H and FFH are interpreted specially.

Exponent fraction = 0 fraction ≠ 0 Equation
00H = 000000002 ±zero subnormal number  
01H, ..., FEH = 000000012, ..., 111111102 normal value  
FFH = 111111112 ±infinity NaN (quiet, signaling)

The minimum positive normal value is   and the minimum positive (subnormal) value is  .

Converting decimal to binary32

edit

In general, refer to the IEEE 754 standard itself for the strict conversion (including the rounding behaviour) of a real number into its equivalent binary32 format.

Here we can show how to convert a base-10 real number into an IEEE 754 binary32 format using the following outline:

  • Consider a real number with an integer and a fraction part such as 12.375
  • Convert and normalize the integer part into binary
  • Convert the fraction part using the following technique as shown here
  • Add the two results and adjust them to produce a proper final conversion

Conversion of the fractional part: Consider 0.375, the fractional part of 12.375. To convert it into a binary fraction, multiply the fraction by 2, take the integer part and repeat with the new fraction by 2 until a fraction of zero is found or until the precision limit is reached which is 23 fraction digits for IEEE 754 binary32 format.

 , the integer part represents the binary fraction digit. Re-multiply 0.750 by 2 to proceed
 
 , fraction = 0.011, terminate

We see that   can be exactly represented in binary as  . Not all decimal fractions can be represented in a finite digit binary fraction. For example, decimal 0.1 cannot be represented in binary exactly, only approximated. Therefore:

 

Since IEEE 754 binary32 format requires real values to be represented in   format (see Normalized number, Denormalized number), 1100.011 is shifted to the right by 3 digits to become  

Finally we can see that:  

From which we deduce:

  • The exponent is 3 (and in the biased form it is therefore  )
  • The fraction is 100011 (looking to the right of the binary point)

From these we can form the resulting 32-bit IEEE 754 binary32 format representation of 12.375:

 

Note: consider converting 68.123 into IEEE 754 binary32 format: Using the above procedure you expect to get   with the last 4 bits being 1001. However, due to the default rounding behaviour of IEEE 754 format, what you get is  , whose last 4 bits are 1010.

Example 1: Consider decimal 1. We can see that:  

From which we deduce:

  • The exponent is 0 (and in the biased form it is therefore  
  • The fraction is 0 (looking to the right of the binary point in 1.0 is all  )

From these we can form the resulting 32-bit IEEE 754 binary32 format representation of real number 1:

 

Example 2: Consider a value 0.25. We can see that:  

From which we deduce:

  • The exponent is ?2 (and in the biased form it is  )
  • The fraction is 0 (looking to the right of binary point in 1.0 is all zeroes)

From these we can form the resulting 32-bit IEEE 754 binary32 format representation of real number 0.25:

 

Example 3: Consider a value of 0.375. We saw that  

Hence after determining a representation of 0.375 as   we can proceed as above:

  • The exponent is ?2 (and in the biased form it is  )
  • The fraction is 1 (looking to the right of binary point in 1.1 is a single  )

From these we can form the resulting 32-bit IEEE 754 binary32 format representation of real number 0.375:

 

Converting binary32 to decimal

edit

If the binary32 value, 41C80000 in this example, is in hexadecimal we first convert it to binary:

 

then we break it down into three parts: sign bit, exponent, and significand.

  • Sign bit:  
  • Exponent:  
  • Significand:  

We then add the implicit 24th bit to the significand:

  • Significand:  

and decode the exponent value by subtracting 127:

  • Raw exponent:  
  • Decoded exponent:  

Each of the 24 bits of the significand (including the implicit 24th bit), bit 23 to bit 0, represents a value, starting at 1 and halves for each bit, as follows:

bit 23 = 1
bit 22 = 0.5
bit 21 = 0.25
bit 20 = 0.125
bit 19 = 0.0625
bit 18 = 0.03125
bit 17 = 0.015625
.
.
bit 6 = 0.00000762939453125
bit 5 = 0.000003814697265625
bit 4 = 0.0000019073486328125
bit 3 = 0.00000095367431640625
bit 2 = 0.000000476837158203125
bit 1 = 0.0000002384185791015625
bit 0 = 0.00000011920928955078125

The significand in this example has three bits set: bit 23, bit 22, and bit 19. We can now decode the significand by adding the values represented by these bits.

  • Decoded significand:  

Then we need to multiply with the base, 2, to the power of the exponent, to get the final result:

 

Thus

 

This is equivalent to:

 

where s is the sign bit, x is the exponent, and m is the significand.

Precision limitations on decimal values (between 1 and 16777216)

edit
  • Decimals between 1 and 2: fixed interval 2?23 (1+2?23 is the next largest float after 1)
  • Decimals between 2 and 4: fixed interval 2?22
  • Decimals between 4 and 8: fixed interval 2?21
  • ...
  • Decimals between 2n and 2n+1: fixed interval 2n?23
  • ...
  • Decimals between 222=4194304 and 223=8388608: fixed interval 2?1=0.5
  • Decimals between 223=8388608 and 224=16777216: fixed interval 20=1

Precision limitations on integer values

edit
  • Integers between 0 and 16777216 can be exactly represented (also applies for negative integers between ?16777216 and 0)
  • Integers between 224=16777216 and 225=33554432 round to a multiple of 2 (even number)
  • Integers between 225 and 226 round to a multiple of 4
  • ...
  • Integers between 2n and 2n+1 round to a multiple of 2n?23
  • ...
  • Integers between 2127 and 2128 round to a multiple of 2104
  • Integers greater than or equal to 2128 are rounded to "infinity".

Notable single-precision cases

edit

These examples are given in bit representation, in hexadecimal and binary, of the floating-point value. This includes the sign, (biased) exponent, and significand.

0 00000000 000000000000000000000012 = 0000 000116 = 2?126 × 2?23 = 2?149 ≈ 1.4012984643 × 10?45
                                      (smallest positive subnormal number)

0 00000000 111111111111111111111112 = 007f ffff16 = 2?126 × (1 ? 2?23) ≈ 1.1754942107 ×10?38
                                      (largest subnormal number)

0 00000001 000000000000000000000002 = 0080 000016 = 2?126 ≈ 1.1754943508 × 10?38
                                      (smallest positive normal number)

0 11111110 111111111111111111111112 = 7f7f ffff16 = 2127 × (2 ? 2?23) ≈ 3.4028234664 × 1038
                                      (largest normal number)

0 01111110 111111111111111111111112 = 3f7f ffff16 = 1 ? 2?24 ≈ 0.999999940395355225
                                      (largest number less than one)

0 01111111 000000000000000000000002 = 3f80 000016 = 1 (one)

0 01111111 000000000000000000000012 = 3f80 000116 = 1 + 2?23 ≈ 1.00000011920928955
                                      (smallest number larger than one)

1 10000000 000000000000000000000002 = c000 000016 = ?2
0 00000000 000000000000000000000002 = 0000 000016 = 0
1 00000000 000000000000000000000002 = 8000 000016 = ?0

0 11111111 000000000000000000000002 = 7f80 000016 = infinity
1 11111111 000000000000000000000002 = ff80 000016 = ?infinity

0 10000000 100100100001111110110112 = 4049 0fdb16 ≈ 3.14159274101257324 ≈ π (pi)
0 01111101 010101010101010101010112 = 3eaa aaab16 ≈ 0.333333343267440796 ≈ 1/3

x 11111111 100000000000000000000012 = ffc0 000116 = qNaN (on x86 and ARM processors)
x 11111111 000000000000000000000012 = ff80 000116 = sNaN (on x86 and ARM processors)

By default, 1/3 rounds up, instead of down like double-precision, because of the even number of bits in the significand. The bits of 1/3 beyond the rounding point are 1010... which is more than 1/2 of a unit in the last place.

Encodings of qNaN and sNaN are not specified in IEEE 754 and implemented differently on different processors. The x86 family and the ARM family processors use the most significant bit of the significand field to indicate a quiet NaN. The PA-RISC processors use the bit to indicate a signaling NaN.

Optimizations

edit

The design of floating-point format allows various optimisations, resulting from the easy generation of a base-2 logarithm approximation from an integer view of the raw bit pattern. Integer arithmetic and bit-shifting can yield an approximation to reciprocal square root (fast inverse square root), commonly required in computer graphics.

See also

edit

References

edit
  1. ^ "REAL Statement". scc.ustc.edu.cn. Archived from the original on 2025-08-06. Retrieved 2025-08-06.
  2. ^ "CLHS: Type SHORT-FLOAT, SINGLE-FLOAT, DOUBLE-FLOAT..." www.lispworks.com.
  3. ^ "Primitive Data Types". Java Documentation.
  4. ^ "6 Predefined Types and Classes". haskell.org. 20 July 2010.
  5. ^ "Float". Apple Developer Documentation.
  6. ^ William Kahan (1 October 1997). "Lecture Notes on the Status of IEEE Standard 754 for Binary Floating-Point Arithmetic" (PDF). p. 4. Archived from the original (PDF) on 8 February 2012.
edit
头发粗硬是什么原因 95属什么生肖 什么火海 臭酸是什么 玻尿酸是什么东西
牙痛用什么药止痛快 蜂蜜吃了有什么好处 压脚背有什么好处 费洛蒙是什么 kda是什么单位
山竹有什么好处 甩货是什么意思 大腿根疼是什么原因 女兔配什么属相最好 倒刺是什么原因引起的
妆前乳是什么 小孩睡觉说梦话是什么原因 世态炎凉什么意思 偏科是什么意思 无患子为什么叫鬼见愁
生吃黄瓜有什么好处fenrenren.com 莫名是什么意思shenchushe.com 谷丙转氨酶高挂什么科hcv9jop2ns9r.cn 淋巴结钙化是什么意思hcv7jop7ns0r.cn 什么星hcv7jop6ns1r.cn
拿什么证明分居两年hcv9jop1ns2r.cn 鹅蛋吃了有什么好处bfb118.com 大虾不能和什么一起吃hcv8jop8ns0r.cn 什么是性格0735v.com 陌上花开可缓缓归矣什么意思hcv8jop5ns6r.cn
支气管炎吃什么药最有效hcv8jop4ns8r.cn 阴道炎是什么原因引起的hcv9jop8ns3r.cn 鸾凤和鸣什么意思hcv9jop5ns9r.cn 嘴歪是什么病的前兆hcv9jop3ns5r.cn 眷念是什么意思hcv8jop8ns5r.cn
硼酸是什么hcv9jop7ns9r.cn 面包属于什么类食品hcv7jop7ns2r.cn 家是什么imcecn.com 来姨妈可以吃什么水果hcv9jop0ns5r.cn 咳嗽有痰吃什么药好得最快最有效hcv8jop9ns5r.cn
百度