移植后屁多是什么原因| 过誉是什么意思| 1987是什么年| 当归什么味道| 什么东西清肺止咳| 女生喝红牛有什么影响| 带状疱疹什么样子| 鸿运当头是什么意思| 摇滚是什么意思| 老烂腿用什么药最好| 女人性冷淡是什么原因| 飞机后面的白烟是什么| 中医湿气重是什么意思| 做梦笑醒了有什么征兆| 吨位是什么意思| 尿道口流脓吃什么药| 儿童湿疹用什么药| 孕晚期宫缩是什么感觉| 肌肉萎缩是什么原因| 什么是热病| 面部神经吃什么药| 梦见自己穿孝衣有什么征兆| 台湾什么时候回归| 118是什么星座| 接盘侠什么意思| 身上出现白块什么原因| 吃什么菜对肝好怎么养肝| 孙子兵法是什么生肖| 什么东西越热越爱出来| 孕反什么时候结束| 上夜班吃什么对身体好| 属猪的跟什么属相最配| 左肺上叶钙化灶什么意思| 淋巴结肿大是什么样子| 总感觉自己有病是什么心理病| 胸闷挂什么科室| ppd是什么| 牙杀完神经为什么还疼| 主动脉钙化什么意思| 托马斯是什么意思| peace是什么牌子| 朱元璋属什么生肖| 机警是什么意思| 左侧淋巴结肿大是什么原因| kcal是什么意思| 五月二十九是什么日子| 太阳穴痛是什么原因| 狐臭什么味道| 六亲不认是什么生肖| 做梦梦见好多蛇是什么预兆| 风湿性关节炎用什么药| 智利说什么语言| 什么是心脑血管疾病| 支教是什么意思| l是什么码| 砥砺是什么意思| 书签是什么| 静脉曲张做什么检查| 肺痈是什么意思| 恋恋不舍的意思是什么| 用字五行属什么| 女人什么时候是安全期| 大姨妈期间适合吃什么| 濯清涟而不妖的濯是什么意思| image什么意思| 为什么会头痛| 免疫力低吃什么好| 嗯嗯嗯是什么意思| 鲤鱼吃什么食物| 脓血症是什么病严重吗| 鼻子经常出血是什么原因| 婴儿睡觉头上出汗多是什么原因| 喝什么能减肥| 挚爱和至爱有什么区别| 上火吃什么水果降火快| 为什么手会脱皮| 七七事变是什么生肖| 尿路感染吃什么药好得快| 为什么屁多是什么原因| 藏红花可以搭配什么泡水喝| 奶粉中的opo是什么| 七夕节是什么节日| 压箱底是什么意思| 吃饭快的人是什么性格| 腋毛什么时候开始生长| roi是什么| 什么是抗阻运动| 农字五行属什么| 老师为什么叫老师| 月经期间肚子疼是什么原因| 卦是什么意思| EE什么意思| tg是什么| 罗马棉是什么面料| 撕漫男什么意思| 什么药能治痛风| 南京有什么好吃的| 乳腺低回声是什么意思| 猪八戒叫什么名字| 我们为什么会笑| 人生是什么| 石蜡是什么东西| 昏天黑地什么意思| 增加骨密度吃什么药| 什么食物含锌多| 什么是化学阉割| 焦虑症吃什么中成药能根治| 左腿发麻是什么病征兆| 渗透压是什么意思| 减肥吃什么食物| 坐月子可以吃什么菜| 彩铅是什么| 发改委是干什么的| 朱元璋为什么杀蓝玉| 俄罗斯人是什么人种| 宝宝吐奶是什么原因引起的| 晚上吃什么有助于减肥| 心律不齐吃什么药好| 衣柜放什么代替樟脑丸| 属羊是什么星座| 管理的本质是什么| 什么叫tct检查| 苏麻为什么不嫁给康熙| 杆鱼是什么鱼| 口业是什么意思| 吃什么对前列腺有好处| 儿童看包皮挂什么科| 中暑吃什么药| 3月10日是什么星座| 薛之谦属什么生肖| 芡实适合什么人吃| 什么叫失眠| 丑人多作怪什么意思| 天天睡不着觉什么原因| 小孩腿疼膝盖疼可能是什么原因| 为什么你| 世界上最大的岛是什么岛| 早上六点半是什么时辰| 耻骨高是什么原因| 香波是什么| 气滞血瘀是什么意思| 出虚汗吃什么中成药| 农村入党需要什么条件| 退烧药吃什么| 资深是什么意思| 甘油三酯高吃什么食物好| 起大运是什么意思| 是什么样的| 尿频尿急是什么原因| 科学的尽头是什么| 舍是什么结构| 美国为什么有两块土地| 陌上是什么意思| 什么是末法时代| 西洋参什么时候吃效果最好| 脾胃气滞吃什么中成药| 书店里买不到什么书| 玫瑰红是什么颜色| 弟是什么结构的字| 喝酒后不能吃什么药| 麻风病是什么病| 政协主席是什么级别| 三点水念什么| 天煞是什么意思| 寻麻疹吃什么药| 什么是一桌餐| 酒后头疼什么原因| 上火引起的喉咙痛吃什么药| 脑炎什么症状| 6月6日什么星座| 肛瘘是什么意思| 什么的香蕉| 美国为什么要打伊拉克| 蓝色配什么颜色最好看| 泮是什么意思| 白头翁吃什么食物| 卧推60公斤什么水平| 张国荣什么时候去世的| 高反是什么意思| 山东的简称是什么| 子子念什么| 御守是什么| 腿纹不对称有什么影响| 肾阴阳两虚吃什么药| 蚂蚁上树什么意思| 11.18是什么星座| 痤疮是什么引起的| 爱新觉罗是什么旗| 后背痒是什么原因| 腮腺炎吃什么药好| 梅花三弄是什么意思| 医院院长是什么级别| 丹参滴丸和丹参片有什么区别| 多吃海带有什么好处和坏处| 卷腹是什么| 翡翠属于什么玉| 尿酸高适合吃什么水果| 不适是什么意思| 重庆沱茶属于什么茶| 什么是代孕| 孕妇吃什么水果| 鹰头皮带是什么牌子| 吃什么补叶酸| 什么东西助眠| 胸口疼是什么病的前兆| 无底洞是什么意思| 收到是什么意思| 输液葡萄糖有什么作用| 身上长白点是什么原因| 西贝是什么| 数字3五行属什么| 肝火吃什么药| 双生什么意思| 左心室高电压什么意思| 喜欢一个人会有什么表现| 创伤性湿肺是什么意思| qa和qc有什么区别| 通告是什么意思| 城投公司是干什么的| ace是什么| 球麻痹是什么病| 好汉不吃眼前亏是什么意思| 梦见挖坟墓预示什么| 甲功异常有什么症状| 三月十五是什么星座| 娃娃脸是什么意思| 海苔是什么做的| 珞字五行属什么| 唾液有臭味是什么原因| 杠杆率是什么意思| 脑心通主治什么病| solo 什么意思| 治疗晕病有什么好方法| 妈妈的堂哥叫什么| 梦见已故的父母是什么兆头| 紫外线过敏是什么症状| 葡萄糖氯化钠注射作用是什么| 脾大是什么原因| 什么病不能吃核桃| 眼皮跳挂什么科| 传媒公司是做什么的| 膀胱壁增厚是什么原因| 医保定点医院是什么意思| 宇五行属性是什么| 魁罡贵人是什么意思| 不以为然什么意思| 奔走相告的走是什么意思| 工体是什么意思| 什么叫meta分析| 避孕套和安全套有什么区别| 止汗药什么最好| 幼犬拉稀吃什么药最好| 舌头上有黑点是什么原因| 天神是什么意思| EPS什么意思| 中国国菜是什么菜| 身份证照片穿什么颜色衣服| 孩子气是什么意思| 嘴唇发麻什么病兆| 甲状腺挂什么科| wy是什么牌子| 衤字旁的字与什么有关| 隐翅虫咬了用什么药膏| b型阳性血是什么意思| 百度Jump to content

日月星辰是什么意思

From Wikipedia, the free encyclopedia
百度 国家博物馆信立祥研究员、北京大学博士生导师秦大树教授、湖南省文物考古研究所所长郭伟民研究员和江苏省文物考古研究所所长林留根研究员等专家也表示,从器型和工艺上看,这次发掘找到了秘色瓷的生产窑址,从而解决了多年的未解之谜。

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]
小腹一直疼是什么原因 父亲节是什么时候 维生素b2有什么作用和功效 塑胶厂是做什么的 胎盘位于前壁是什么意思
清华大学校长是什么级别 哺乳期抽烟对宝宝有什么影响 天喜星是什么意思 头孢主要治什么病 铅中毒是什么引起的
健康证什么时候可以办 低密度脂蛋白高有什么症状 哈尔滨有什么好吃的 禁欲是什么意思 手发胀是什么原因造成的
肌酐测定是查什么 射手座男和什么星座最配 梦到棺材什么意思 手机充电慢是什么原因 吸血鬼怕什么
耳毛念什么ff14chat.com 海虫草是什么wuhaiwuya.com 补血吃什么最好最快hcv9jop2ns2r.cn 煮茶叶蛋用什么茶hcv7jop9ns0r.cn 什么姓氏好听hcv8jop0ns0r.cn
法身是什么意思jasonfriends.com 孩提是什么意思hcv8jop8ns7r.cn 心脏在什么位置zsyouku.com 咽炎挂什么科室hcv8jop2ns4r.cn 月经期不能吃什么水果helloaicloud.com
口腔出血是什么病征兆hcv9jop5ns7r.cn 太字五行属什么shenchushe.com 庚日是什么意思啊hcv8jop1ns9r.cn 什么是飞机杯hcv9jop0ns6r.cn 小孩咳嗽不能吃什么食物hcv9jop2ns0r.cn
杜仲配什么补肾最好hcv9jop2ns5r.cn 耳垂后面疼是什么原因fenrenren.com 9.21是什么星座hcv8jop7ns2r.cn 第一次坐飞机需要注意什么hcv9jop8ns1r.cn 男生回复嗯嗯代表什么hcv8jop9ns5r.cn
百度