- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Computer Systems:A Programmer’s Perspective 程序设计与计算机系统Lecture 2c November 18, 2014 Wu junmin (jmwu@ustc.edu.cn) Overview IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties Floating Point Puzzles For each of the following C expressions, either: Argue that it is true for all argument values Explain why not true IEEE Floating Point IEEE Standard 754 Established in 1985 as uniform standard for floating point arithmetic Before that, many idiosyncratic formats Supported by all major CPUs Driven by Numerical Concerns Nice standards for rounding, overflow, underflow Hard to make go fast Numerical analysts predominated over hardware types in defining standard Fractional Binary Numbers Representation Bits to right of “binary point” represent fractional powers of 2 Represents rational number: Frac. Binary Number Examples Value Representation 5-3/4 101.112 2-7/8 10.1112 63/64 0.1111112 Observations Divide by 2 by shifting right Multiply by 2 by shifting left Numbers of form 0.111111…2 just below 1.0 1/2 + 1/4 + 1/8 + … + 1/2i + … ? 1.0 Use notation 1.0 – ? Representable Numbers Limitation Can only exactly represent numbers of the form x/2k Other numbers have repeating bit representations Value Representation 1/3 0.0101010101[01]…2 1/5 0.001100110011[0011]…2 1/10 0.0001100110011[0011]…2 Floating Point Representation Numerical Form –1s M 2E Sign bit s determines whether number is negative or positive Significand M normally a fractional value in range [1.0,2.0). Exponent E weights value by power of two Encoding MSB is sign bit exp field encodes E frac field encodes M Floating Point Precisions FP comes in three flavors Normalized: When exp isn’t all 0s or 1s Larges range Mantissa has implied leading “1.” Denormalized: When exp is all 0s evenly spaced close to 0 Special: When exp is all 1s infinities Not a numbers “Normalized” Numeric Values Condition:?exp ? 000…0 and exp ? 111…1 Exponent coded as biased value ?E = Exp – B
您可能关注的文档
最近下载
- 历史八年级上册《第七单元 人民解放战争》大单元整体教学设计2025.docx VIP
- GZ-2022024机器视觉系统应用赛项赛题完整版包括试题答案及全部附件-2022年全国职业院校技能大赛拟设赛项赛题.pdf VIP
- 使用安装说明书三菱电机上菱空调机.pdf VIP
- SAP培训详细分解详细分解.ppt VIP
- 7《咱当兵的人》教学设计.doc VIP
- 2024年10月浙江自考设计概论试题及答案解析.docx
- 人教版(2024)一年级美术上册第二单元《勤劳的蚕宝宝》精品课件.pptx VIP
- 《全国导游基础知识》第一节亚洲主要客源国概况(1)习题.docx VIP
- 北师大版五年级上册数学《练习四》.ppt VIP
- SAP PP模块培训材料【116页超详细】.pdf
文档评论(0)