- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Floating-Point Arithmetic
Floating-Point Arithmetic What is the problem? Many numeric applications require numbers over a VERY large range. (e.g. nanoseconds to centuries) Most scientific applications require real numbers (e.g. ?) But so far we only have integers. We *COULD* implement the fractions explicitly (e.g. ?, 1023/102934) We *COULD* use bigger integers Floating point is a better answer for most applications. Recall Scientific Notation Let’s start our discussion of floating point by recalling scientific notation from high school Numbers represented in parts: 42 = 4.200 x 101 1024 = 1.024 x 103 -0.0625 = -6.250 x 10-2 Arithmetic is done in pieces 1024 1.024 x 103 - 42 - 0.042 x 103 982 0.982 x 103 9.820 x 102 Multiplication in Scientific Notation Is straightforward: Multiply together the significant parts Add the exponents Normalize if required Examples: 1024 1.024 x 103 x 0.0625 6.250 x 10-2 64 6.400 x 101 42 4.200 x 101 x 0.0625 6.250 x 10-2 2.625 26.250 x 10-1 2.625 x 100 (Normalized) FP == “Binary” Scientific Notation IEEE single precision floating-point format 0in hexadecimal Exponent: Unsigned “Bias 127” 8-bit integer E = Exponent + 127 Exponent =(132) – 127 = 5 Significand: Unsigned fixed binary point with “hidden-one” Significand = “1”+ 0.01010000000000000000000 = 1.3125 Putting it all together N = -1S (1 + F ) x 2E-127 = -10 (1.3125) x 25 = 42 Example Numbers One Sign = +, Exponent = 0, Significand = 1.0 -10 (1 .0) x 20 = 1 S = 0, E = 0 + 127, F = 1.0 – ‘1’ 0 00000000000000000000000 0x3f800000 One-half Sign = +, Exponent = -1, Significand = 1.0 -10 (1 .0) x 2-1 = ? S = 0, E = -1 + 127, F = 1.0 – ‘1’ 0 00000000000000000000000 0x3f000000 Minus Two Sign = -, Exponent = 1, Significand = 1.0 1 00000000000000000000000
您可能关注的文档
最近下载
- 军事历史(空军工程大学)网课章节测试答案.pdf
- 案例25-李娟利等与张波集资房买卖的合同 纠纷上诉案.docx VIP
- MAYA灯光材质渲染.ppt VIP
- 中西文化对比提升学生视野教学研究课题报告.docx
- 《材质与灯光渲染》教学大纲.docx VIP
- 《角色绑定与动画》教学大纲.docx VIP
- 高标准农田建设项目复核审计服务115页.docx VIP
- 临床输血操作技术规范、输血制度(2025版).pptx VIP
- 部编版四年级上学期语文期末整理分类复习强化练习题〔有答案〕.doc VIP
- 公路养护及占道施工作业安全检查表、人员、车辆、机具设备管理用表、进、出场登记表、安全设施图表.pdf VIP
原创力文档


文档评论(0)