什么是舌吻| 失眠挂什么科| 动则气喘是什么原因| 单身公寓是什么意思| 为什么胸会痒| 比中指是什么意思| 猪肝可以钓什么鱼| 睡不着觉挂什么科| 09年属什么| 痔疮属于什么科室| 杀青了是什么意思| 西柚不能和什么一起吃| whirlpool是什么牌子| 手热脚热是什么原因| 隽字五行属什么| 柿子像什么| 红眼病用什么眼药水| 梦见自己被绑架了是什么意思| 笔画最多的字是什么| 讳疾忌医什么意思| 胆管堵塞有什么症状| 痰中带血吃什么药| 为什么阴道会排气| 蛋白粉什么时候吃最好| 拉姆藏语什么意思| 灰姑娘叫什么名字| 为什么老是掉头发特别厉害| gi是什么意思| 唇珠在面相中代表什么| 屡禁不止的意思是什么| 乳头瘤是什么病| 脸上长痘痘什么原因| 糖尿病能喝什么饮料| 湿疹吃什么水果好| 相敬如宾是什么意思| 小棉袄是什么意思| 庶子什么意思| 壬申日是什么意思| 咳痰带血是什么原因| crp是什么| edt是什么时间| 重庆沱茶属于什么茶| 11月18号是什么星座的| 中央处理器由什么组成| 礼五行属什么| 水和什么相生| 千米的字母是什么| 利玛窦什么时候来中国| 胆汁反流吃什么食物好| 什么是虎牙| 手串什么材料的最好| 宝宝发烧拉肚子是什么原因| 新生儿拉肚子是什么原因引起的| 情绪价值是什么意思| 山东有什么特产| 什么时间最容易受孕| 灵芝孢子粉是什么| 地龙是什么| 清汤寡水是什么意思| 全性向是什么意思| 孤家寡人什么意思| 立冬和冬至什么区别| 西沙必利片治什么病| 面条是什么做的| 3月29是什么星座| 地动山摇是什么生肖| bata鞋属于什么档次| 前列腺是什么东西| 嚷能组什么词| 胖脸适合什么发型| 耳石是什么| 女人吃什么水果最好| 尿不尽是什么意思| 吃什么水果补肾| chd医学上是什么意思| 跳爵士舞穿什么衣服| 宋江是什么星| 世事无常是什么意思| 失格是什么意思| 小孩感冒发烧吃什么药| 施华洛世奇什么档次| 1988年出生是什么命| 牙齿一吸就出血是什么原因| 为什么月经会提前来| 什么是脑白质病变| 等不到天黑烟火不会太完美什么歌| 单抗主要治疗什么| 过午不食什么意思| 宫颈异常是什么意思| 思密达是什么药| 后脑勺痛什么原因引起的| 什么是佛教什么是道教| 鹅口疮有什么症状| 支原体感染是什么病| 相生什么意思| 碉堡是什么意思啊| 什么繁什么茂| 割包皮挂什么科室| 猪心炖什么治失眠| 梦见小鬼是什么预兆| 夺目的什么| 1995年属什么生肖| 中阴身是什么意思| 林彪为什么叛变| 阳起石是什么东西| 情是什么意思| 忌口是什么意思| 中医的精髓是什么| 睡莲为什么不开花| 人体第一道防线是什么| 红色学士服是什么学位| 千张炒什么好吃| 老是睡不着觉是什么原因| 眼睛屈光不正什么意思| 吃什么长胖| 为什么会说梦话| 蓝五行属什么| 人工牛黄是什么| 两弹一星是什么| 衣冠禽兽是什么意思| 嘴唇红是什么原因| 柠檬苦是什么原因| 36是什么码| 什么的青蛙| 淋巴细胞偏低什么意思| 彩棉是什么面料| 一九八三年属什么生肖| 四个口是什么字| 铁是补什么的| 苹果对身体有什么好处| 授记是什么意思| 腹泻吃什么好| 反讽是什么意思| rue是什么意思| 粉色配什么颜色| 密度单位是什么| 卡点是什么意思| nos是什么单位| 甘油三酯高是什么| 睾丸积液吃什么药最好| ptt是什么| 子宫肌瘤挂什么科室| hpv检查什么项目| 一穷二白什么意思| 存款准备金率是什么意思| 为什么屁多是什么原因| 蛋白高是什么病| 肾炎的饮食应注意什么| 什么是思想| 胃气上逆有什么好的办法治疗| 什么是风水| 耳后长痣代表什么意思| 混油皮是什么特征| 外痔长什么样| 小便分叉是什么症状| 衣食无忧是什么生肖| 人参是什么参| 吃什么助于长高| 鼻窦炎是什么原因引起的呢| 什么东西一吃就死| 吃酒是什么意思| 阴道里面长什么样| 厉兵秣马什么意思| 肺腺瘤是什么| 舌加氏念什么| 孝是什么| 位置是什么意思| 唐伯虎属什么生肖| 猕猴桃什么季节成熟| 集少两撇是什么字| 二重唱是什么意思| 抖s是什么意思| 一什么头发| 月经来了不走是什么原因| 多囊卵巢综合症吃什么药| 血沉50说明什么原因| 自信是什么意思| 兜售是什么意思| 巨是什么结构| 脚干裂用什么药膏| 脑供血不足吃什么药| 缺氧是什么症状| 盆腔炎吃什么药好得快| 什么是植发| omega3是什么意思| 梦见游泳是什么预兆| peak是什么牌子| 香蕉补什么| 鑫字代表什么生肖| 左眼屈光不正是什么意思| ce是什么元素| 太阳穴疼痛是什么原因| 葫芦什么时候成熟| beast什么意思| kg是什么意思| 衤叫什么偏旁| 胃溃疡可以吃什么水果| 可逆是什么意思| 男人壮阳吃什么最快| 漏尿是什么原因引起的| 扁桃体切除对身体有什么影响| 手抽筋吃什么药| 怀孕前三个月要注意什么| 人的血压一天中什么时候最高| 猫薄荷是什么东西| 左大腿外侧麻木是什么原因| 手机电池是什么电池| 多动症挂什么科| esr是什么| 小燕子吃什么食物| 栓塞是什么意思| 海椒是什么辣椒| 扁平疣用什么治疗| 欲盖弥彰是什么意思| 白醋和小苏打一起用起什么效果| 嫔妃是什么意思| 姓贾的男孩取什么名字好| 锁骨属于什么骨| air是什么意思| 性冷淡是什么意思| 12月24号是什么星座| 智齿为什么会疼| 蓝色加红色等于什么颜色| 七月半是什么节日| 三基色是什么颜色| ear什么意思| 读书的意义是什么| 肺慢阻是什么情况| 更年期什么症状| 肚子上长毛是什么原因| 什么地跳| 茴香是什么| 什么东西最隔音| 篮子是什么意思| 腺肌症是什么原因引起的| 试婚是什么意思啊| 手上的三条线分别代表什么| 流产会出现什么症状| aed是什么| 什么情况下需要割包皮| mio是什么意思| 中国的国服是什么服装| 举足轻重什么意思| 4月14日是什么星座| 胆碱是什么| 为什么白天能看到月亮| 四书五经是什么| tap什么意思| 恩客是什么意思| 女儿是小棉袄儿子是什么| 远视眼是什么意思| 贫血吃什么| 不遗余力的遗是什么意思| 肝脏排毒吃什么最好| 什么时候割包皮最好| 什么罩杯最大| 务实什么意思| 闭关什么意思| 大便白色是什么原因| 眼睛发粘是什么原因| 双侧腋窝淋巴结可见什么意思| 女人银屑病一般都长什么地方| fml什么意思| 榴莲坏了是什么味道| 百度Jump to content

国足惨败引发里皮变革,武磊浪费机会非最差,防线双将令人齿冷

From Wikipedia, the free encyclopedia
百度   78名患结核病高考生能否顺利体检  桃江四中78名患肺结核病考生已有59人返校湖南教育厅同意他们高考体检推迟两个月学生们正在备考供图/中国桃江网  昨天是世界防治结核病日。

Hexadecimal floating point (now called HFP by IBM) is a format for encoding floating-point numbers first introduced on the IBM System/360 computers, and supported on subsequent machines based on that architecture,[1][2][3] as well as machines which were intended to be application-compatible with System/360.[4][5]

In comparison to IEEE 754 floating point, the HFP format has a longer significand, and a shorter exponent. All HFP formats have 7 bits of exponent with a bias of 64. The normalized range of representable numbers is from 16?65 to 1663 (approx. 5.39761 × 10?79 to 7.237005 × 1075).

The number is represented as the following formula: (?1)sign × 0.significand × 16exponent?64.

Single-precision 32-bit

[edit]

A single-precision HFP number (called "short" by IBM) is stored in a 32-bit word:

1 7 24 (width in bits)
S Exp Fraction  
31 30 ... 24 23 ... 0 (bit index)*
* IBM documentation numbers the bits from left to right, so that the most significant bit is designated as bit number 0.

In this format the initial bit is not suppressed, and the radix (hexadecimal) point is set to the left of the significand (fraction in IBM documentation and the figures).

Since the base is 16, the exponent in this form is about twice as large as the equivalent in IEEE 754, in order to have similar exponent range in binary, 9 exponent bits would be required.

Example

[edit]

Consider encoding the value ?118.625 as an HFP single-precision floating-point value.

The value is negative, so the sign bit is 1.

The value 118.62510 in binary is 1110110.1012. This value is normalized by moving the radix point left four bits (one hexadecimal digit) at a time until the leftmost digit is zero, yielding 0.011101101012. The remaining rightmost digits are padded with zeros, yielding a 24-bit fraction of .0111 0110 1010 0000 0000 00002.

The normalized value moved the radix point two hexadecimal digits to the left, yielding a multiplier and exponent of 16+2. A bias of +64 is added to the exponent (+2), yielding +66, which is 100 00102.

Combining the sign, exponent plus bias, and normalized fraction produces this encoding:

S Exp Fraction  
1 100 0010 0111 0110 1010 0000 0000 0000  

In other words, the number represented is ?0.76A00016 × 1666 ? 64 = ?0.4633789… × 16+2 = ?118.625

Largest representable number

[edit]
S Exp Fraction  
0 111 1111 1111 1111 1111 1111 1111 1111  

The number represented is +0.FFFFFF16 × 16127 ? 64 = (1 ? 16?6) × 1663 ≈ +7.2370051 × 1075

Smallest positive normalized number

[edit]
S Exp Fraction  
0 000 0000 0001 0000 0000 0000 0000 0000  

The number represented is +0.116 × 160 ? 64 = 16?1 × 16?64 ≈ +5.397605 × 10?79.

Zero

[edit]
S Exp Fraction  
0 000 0000 0000 0000 0000 0000 0000 0000  

Zero (0.0) is represented in normalized form as all zero bits, which is arithmetically the value +0.016 × 160 ? 64 = +0 × 16?64 ≈ +0.000000 × 10?79 = 0. Given a fraction of all-bits zero, any combination of positive or negative sign bit and a non-zero biased exponent will yield a value arithmetically equal to zero. However, the normalized form generated for zero by CPU hardware is all-bits zero. This is true for all three floating-point precision formats. Addition or subtraction with other exponent values can lose precision in the result.

Precision issues

[edit]

Since the base is 16, there can be up to three leading zero bits in the binary significand. That means when the number is converted into binary, there can be as few as 21 bits of precision. Because of the "wobbling precision" effect, this can cause some calculations to be very inaccurate. This has caused considerable criticism.[6]

A good example of the inaccuracy is representation of decimal value 0.1. It has no exact binary or hexadecimal representation. In hexadecimal format, it is represented as 0.19999999...16 or 0.0001 1001 1001 1001 1001 1001 1001...2, that is:

S Exp Fraction  
0 100 0000 0001 1001 1001 1001 1001 1010  

This has only 21 bits, whereas the binary version has 24 bits of precision.

Six hexadecimal digits of precision is roughly equivalent to six decimal digits (i.e. (6 ? 1) log10(16) ≈ 6.02). A conversion of single precision hexadecimal float to decimal string would require at least 9 significant digits (i.e. 6 log10(16) + 1 ≈ 8.22) in order to convert back to the same hexadecimal float value.

Double-precision 64-bit

[edit]

The double-precision HFP format (called "long" by IBM) is the same as the "short" format except that the fraction field is wider and the double-precision number is stored in a double word (8 bytes):

1 7 56 (width in bits)
S Exp Fraction  
63 62 ... 56 55 ... 0 (bit index)*
* IBM documentation numbers the bits from left to right, so that the most significant bit is designated as bit number 0.

The exponent for this format covers only about a quarter of the range as the corresponding IEEE binary format.

14 hexadecimal digits of precision is roughly equivalent to 17 decimal digits. A conversion of double precision hexadecimal float to decimal string would require at least 18 significant digits in order to convert back to the same hexadecimal float value.

Extended-precision 128-bit

[edit]

Called extended-precision by IBM, a quadruple-precision HFP format was added to the System/370 series and was available on some S/360 models (S/360-85, -195, and others by special request or simulated by OS software). The extended-precision fraction field is wider, and the extended-precision number is stored as two double words (16 bytes):

High-order part
1 7 56 (width in bits)
S Exp Fraction (high-order 14 digits)  
127 126 ... 120 119 ... 64 (bit index)*
Low-order part
8 56 (width in bits)
Unused Fraction (low-order 14 digits)  
63 ... 56 55 ... 0 (bit index)*
* IBM documentation numbers the bits from left to right, so that the most significant bit is designated as bit number 0.

28 hexadecimal digits of precision is roughly equivalent to 32 decimal digits. A conversion of extended precision HFP to decimal string would require at least 35 significant digits in order to convert back to the same HFP value. The stored exponent in the low-order part is 14 less than the high-order part, unless this would be less than zero.

Arithmetic operations

[edit]

Available arithmetic operations are add and subtract, both normalized and unnormalized, and compare. Prenormalization is done based on the exponent difference. Multiply and divide prenormalize unnormalized values, and truncate the result after one guard digit. There is a halve operation to simplify dividing by two. Starting in ESA/390, there is a square root operation. All operations have one hexadecimal guard digit to avoid precision loss. Most arithmetic operations truncate like simple pocket calculators. Therefore, 1 ? 16?8 = 1. In this case, the result is rounded away from zero.[7]

IEEE 754 on IBM mainframes

[edit]

Starting with the S/390 G5 in 1998,[8] IBM mainframes have also included IEEE binary floating-point units which conform to the IEEE 754 Standard for Floating-Point Arithmetic. IEEE decimal floating-point was added to IBM System z9 GA2[9] in 2007 using millicode[10] and in 2008 to the IBM System z10 in hardware.[11]

Modern IBM mainframes support three floating-point radices with 3 hexadecimal (HFP) formats, 3 binary (BFP) formats, and 3 decimal (DFP) formats. There are two floating-point units per core; one supporting HFP and BFP, and one supporting DFP; there is one register file, FPRs, which holds all 3 formats. Starting with the z13 in 2015, processors have added a vector facility that includes 32 vector registers, each 128 bits wide; a vector register can contain two 64-bit or four 32-bit floating-point numbers.[12] The traditional 16 floating-point registers are overlaid on the new vector registers so some data can be manipulated with traditional floating-point instructions or with the newer vector instructions.

Special uses

[edit]

The IBM HFP format is used in:

  • SAS 5 Transport files (.XPT) as required by the Food and Drug Administration (FDA) for New Drug Application (NDA) study submissions,[13]
  • GRIB (GRIdded Binary) data files to exchange the output of weather prediction models (IEEE single-precision floating-point format in current version),
  • GDS II (Graphic Database System II) format files (OASIS is the replacement), and
  • SEG Y (Society of Exploration Geophysicists Y) format files (IEEE single-precision floating-point was added to the format in 2002).[14]

As IBM is the only remaining provider of hardware using the HFP format, and as the only IBM machines that support that format are their mainframes, few file formats require it. One exception is the SAS 5 Transport file format, which the FDA requires; in that format, "All floating-point numbers in the file are stored using the IBM mainframe representation. [...] Most platforms use the IEEE representation for floating-point numbers. [...] To assist you in reading and/or writing transport files, we are providing routines to convert from IEEE representation (either big endian or little endian) to transport representation and back again."[13] Code for IBM's format is also available under LGPLv2.1.[15]

Systems that use the IBM floating-point format

[edit]

The decision for hexadecimal floating-point

[edit]

The article "Architecture of the IBM System/360" explains the choice as being because "the frequency of pre-shift, overflow, and precision-loss post-shift on floating-point addition are substantially reduced by this choice."[16] This allowed higher performance for the large System/360 models, and reduced cost for the small ones. The authors were aware of the potential for precision loss, but assumed that this would not be significant for 64-bit floating-point variables. Unfortunately, the designers seem not to have been aware of Benford's Law which means that a large proportion of numbers will suffer reduced precision.

The book "Computer Architecture" by two of the System/360 architects quotes Sweeney's study of 1958-65 which showed that using a base greater than 2 greatly reduced the number of shifts required for alignment and normalisation, in particular the number of different shifts needed. They used a larger base to make the implementations run faster, and the choice of base 16 was natural given 8-bit bytes. The intention was that 32-bit floats would only be used for calculations that would not propagate rounding errors, and 64-bit double precision would be used for all scientific and engineering calculations. The initial implementation of double precision lacked a guard digit to allow proper rounding, but this was changed soon after the first customer deliveries.[17]

See also

[edit]

References

[edit]
  1. ^ IBM System/360 Principles of Operation, IBM Publication A22-6821-6, Seventh Edition (January 13, 1967), pp.41-50
  2. ^ IBM System/370 Principles of Operation, IBM Publication GA22-7000-4, Fifth Edition (September 1, 1975), pp.157-170
  3. ^ z/Architecture Principles of Operation, IBM Publication SA22-7832-01, Second Edition (October, 2001), chapter 9 ff.
  4. ^ Xerox Data Systems (Oct 1973). Xerox SIGMA 7 Computer Reference Manyal. p. 48. Retrieved Nov 13, 2020.
  5. ^ RCA (Mar 1966). Spectra 70 processors: 35 45 55 (PDF). p. 184. Retrieved Nov 13, 2020.
  6. ^ Warren Jr., Henry S. (2013) [2002]. "The Distribution of Leading Digits". Hacker's Delight (2 ed.). Addison Wesley - Pearson Education, Inc. pp. 385–387. ISBN 978-0-321-84268-8. 0-321-84268-5.
  7. ^ "ESA/390 Enhanced Floating Point Support: An Overview" (PDF). Archived from the original (PDF) on 2025-08-06. Retrieved 2025-08-06.
  8. ^ Schwarz, E. M.; Krygowski, C. A. (September 1999). "The S/390 G5 floating-point unit". IBM Journal of Research and Development. 43 (5.6): 707–721. doi:10.1147/rd.435.0707.
  9. ^ Duale, A. Y.; Decker, M. H.; Zipperer, H.-G.; Aharoni, M.; Bohizic, T. J. (January 2007). "Decimal floating-point in z9: An implementation and testing perspective". IBM Journal of Research and Development. 51 (1.2): 217–227. CiteSeerX 10.1.1.123.9055. doi:10.1147/rd.511.0217.
  10. ^ Heller, L. C.; Farrell, M. S. (May 2004). "Millicode in an IBM zSeries processor". IBM Journal of Research and Development. 48 (3.4): 425–434. CiteSeerX 10.1.1.641.1164. doi:10.1147/rd.483.0425.
  11. ^ Schwarz, E. M.; Kapernick, J. S.; Cowlishaw, M. F. (January 2009). "Decimal floating-point support on the IBM System z10 processor". IBM Journal of Research and Development. 53 (1): 4:1–4:10. doi:10.1147/JRD.2009.5388585.
  12. ^ "z/Architecture Principles of Operation" (PDF). Archived from the original (PDF) on 2025-08-06. Retrieved 2025-08-06.
  13. ^ a b "The Record Layout of a Data Set in SAS Transport (XPORT) Format" (PDF). Retrieved September 18, 2014.
  14. ^ "SEG Y rev 1 Data Exchange format, Release 1.0" (PDF). May 2002.
  15. ^ "Package 'SASxport'" (PDF). March 10, 2020. Archived from the original (PDF) on August 18, 2016. Retrieved July 19, 2016.
  16. ^ Amdahl, Gene; Blaauw, Gerrit; Brooks, Jr, Frederick. "Architecture of the IBM System/360". IBM Journal of Research and Development. 1964: 87. Retrieved 4 September 2023.
  17. ^ Blaauw, Gerrit A.; Brooks, Frederick P. (1997). Computer Architecture (1st ed.). Reading, Massachusetts: Addison-Weslet. ISBN 0-201-10557-8.

Further reading

[edit]
大骨头属于什么垃圾 人流后可以吃什么水果 花椒什么时候成熟 中国第一个不平等条约是什么 缪斯是什么意思
梦见很多坟墓是什么意思 脂溢性脱发吃什么药 红景天有什么功效 fossil是什么牌子 hmo是什么
羊奶不能和什么一起吃 喜金是什么意思 潮汐车道是什么意思 什么时候洗头是最佳时间 坐骨神经痛用什么药最好
什么是什么的眼睛 红细胞压积偏低是什么意思 切脉切的是什么脉 月子期间能吃什么水果 prf是什么意思
振幅是什么意思hcv8jop4ns4r.cn 胎停了有什么明显症状hcv8jop9ns6r.cn 妇炎洁是什么hcv7jop9ns6r.cn 晚五行属什么naasee.com 蕊字五行属什么hcv9jop3ns1r.cn
手淫过度会导致什么hcv8jop9ns3r.cn pv是什么意思hcv7jop6ns5r.cn lgg什么意思hcv8jop5ns0r.cn 12月2日是什么星座xinjiangjialails.com 什么食物去湿气hcv8jop1ns3r.cn
甲状腺结节低回声什么意思hcv9jop1ns0r.cn 梦见小鬼是什么预兆hcv8jop5ns6r.cn 扁桃体发炎是什么症状hcv8jop6ns2r.cn 清明为什么插柳枝hcv8jop8ns5r.cn 脾虚吃什么中成药qingzhougame.com
肾素活性高是什么原因hcv9jop0ns9r.cn 长期玩手机会得什么病liaochangning.com 拉肚子吃什么食物好得快hcv7jop9ns5r.cn 办理生育津贴需要什么资料hcv9jop1ns8r.cn 眼睛感染用什么眼药水hcv8jop8ns3r.cn
百度