ImageVerifierCode 换一换
格式:PDF , 页数:66 ,大小:2MB ,
资源ID:399296      下载积分:10000 积分
快捷下载
登录下载
邮箱/手机:
温馨提示:
如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝扫码支付 微信扫码支付   
注意:如需开发票,请勿充值!
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【http://www.mydoc123.com/d-399296.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(BS PD ISO IEC TS 18661-1-2014 Information technology Programming languages their environments and system software interfaces Floating-point extensions for C Binary floating-point a.pdf)为本站会员(赵齐羽)主动上传,麦多课文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文库(发送邮件至master@mydoc123.com或直接QQ联系客服),我们立即给予删除!

BS PD ISO IEC TS 18661-1-2014 Information technology Programming languages their environments and system software interfaces Floating-point extensions for C Binary floating-point a.pdf

1、BSI Standards Publication PD ISO/IEC TS 18661-1:2014 Information technology Programming languages, their environments, and system software interfaces Floating- point extensions for C Part 1: Binary floating-point arithmeticPD ISO/IEC TS 18661-1:2014 PUBLISHED DOCUMENT National foreword This Publishe

2、d Document is the UK implementation of ISO/IEC TS 18661-1:2014. The UK participation in its preparation was entrusted to Technical Committee IST/5, Programming languages, their environments and system software interfaces. A list of organizations represented on this committee can be obtained on reque

3、st to its secretary. This publication does not purport to include all the necessary provisions of a contract. Users are responsible for its correct application. The British Standards Institution 2014. Published by BSI Standards Limited 2014 ISBN 978 0 580 85414 9 ICS 35.060 Compliance with a British

4、 Standard cannot confer immunity from legal obligations. This Published Document was published under the authority of the Standards Policy and Strategy Committee on 31 August 2014. Amendments issued since publication Date Text affectedPD ISO/IEC TS 18661-1:2014Reference number ISO/IEC TS 18661-1:201

5、4(E) ISO/IEC 2014TECHNICAL SPECIFICATION ISO/IEC TS 18661-1 First edition 2014-07-15Information technology Programming languages, their environments, and system software interfaces Floating- point extensions for C Part 1: Binary floating-point arithmetic Technologies de linformation Langages de prog

6、rammation, leurs environnements et interfaces du logiciel systme Extensions virgule flottante pour C Partie 1: Arithmtique binaire en virgule flottante PD ISO/IEC TS 18661-1:2014 ISO/IEC TS 18661-1:2014(E) COPYRIGHT PROTECTED DOCUMENT ISO/IEC 2014 All rights reserved. Unless otherwise specified, no

7、part of this publication may be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below or ISOs member

8、 body in the country of the requester. ISO copyright office Case postale 56 CH-1211 Geneva 20 Tel. + 41 22 749 01 11 Fax + 41 22 749 09 47 E-mail copyrightiso.org Web www.iso.org Published in Switzerland ii ISO/IEC 2014 All rights reservedPD ISO/IEC TS 18661-1:2014 ISO/IEC TS 18661-1:2014(E) ISO/IEC

9、 2014 All rights reserved iiiContents Page Introduction . v IEC 60559 floating-point standard vBackground . v C support for IEC 60559 viPurpose . vii1 Scope . 1 2 Conformance 1 3 Normative references 1 4 Terms and definitions 2 5 C standard conformance . 25.1 Freestanding implementations 25.2 Predef

10、ined macros 25.3 Standard headers 36 Revised floating-point standard . 5 7 Types . 67.1 Terminology . 67.2 Canonical representation . 78 Operation binding 8 9 Floating to integer conversion 13 10.1 Conversions with decimal character sequences . 13 10 Conversions between floating types and character

11、sequences . 13 10.2 Conversions to character sequences . 1411 Constant rounding directions . 15 12 NaN support 22 13 Integer width macros . 27 14 Mathematics . 2914.1 Nearest integer functions . 2914.1.1 Round to integer value in floating type . 2914.1.2 Convert to integer type . 3114.2 The llogb fu

12、nctions . 3414.3 Max-min magnitude functions . 3514.4 The nextup and nextdown functions . 3614.5 Functions that round result to narrower type 3714.6 Comparison macros . 4014.7 Classification macros . 4114.8 Total order functions 4314.9 Canonicalize functions . 4414.10 NaN functions 4515 The floating

13、-point environment 4715.1 The fesetexcept function 4715.2 The fetestexceptflag function . 4815.3 Control modes . 4816 Type-generic math . 50 Bibliography 52 PD ISO/IEC TS 18661-1:2014 ISO/IEC TS 18661-1:2014(E) iv ISO/IEC 2014 All rights reservedForeword ISO (the International Organization for Stand

14、ardization) and IEC (the International Electrotechnical Commission) form the specialized system for worldwide standardization. National bodies that are members of ISO or IEC participate in the development of International Standards through technical committees established by the respective organizat

15、ion to deal with particular fields of technical activity. ISO and IEC technical committees collaborate in fields of mutual interest. Other international organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the work. In the field of information technology,

16、ISO and IEC have established a joint technical committee, ISO/IEC JTC 1. The procedures used to develop this document and those intended for its further maintenance are described in the ISO/IEC Directives, Part 1. In particular the different approval criteria needed for the different types of docume

17、nt should be noted. This document was drafted in accordance with the editorial rules of the ISO/IEC Directives, Part 2 (see www.iso.org/directives). Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. ISO and IEC shall not be held res

18、ponsible for identifying any or all such patent rights. Details of any patent rights identified during the development of the document will be in the Introduction and/or on the ISO list of patent declarations received (see www.iso.org/patents). Any trade name used in this document is information giv

19、en for the convenience of users and does not constitute an endorsement. For an explanation on the meaning of ISO specific terms and expressions related to conformity assessment, as well as information about ISOs adherence to the WTO principles in the Technical Barriers to Trade (TBT) see the followi

20、ng URL: Foreword - Supplementary information The committee responsible for this document is ISO/IEC JTC 1, Information technology, SC 22, Programming languages, their environments, and system software interfaces. ISO/IEC TS 18661 consists of the following parts, under the general title Information t

21、echnology Programming languages, their environments, and system software interfaces Floating-point extensions for C: Part 1: Binary floating-point arithmetic Part 2: Decimal floating-point arithmetic Part 3: Interchange and extended types Part 4: Supplementary functions Part 5: Supplementary attribu

22、tes Part 1 updates ISO/IEC 9899:2011, Information technology Programming languages C, Annex F in particular, to support all required features of ISO/IEC/IEEE 60559:2011, Information technology Microprocessor Systems Floating-point arithmetic. Part 2 supersedes ISO/IEC TR 24732:2009, Information tech

23、nology Programming languages, their environments and system software interfaces Extension for the programming language C to support decimal floating-point arithmetic. Parts 3-5 specify extensions to ISO/IEC 9899:2011 for features recommended in ISO/IEC/IEEE 60559:2011.PD ISO/IEC TS 18661-1:2014 ISO/

24、IEC TS 18661-1:2014(E) ISO/IEC 2014 All rights reserved vIntroduction Background IEC 60559 floating-point standard The IEEE 754-1985 standard for binary floating-point arithmetic was motivated by an expanding diversity in floating-point data representation and arithmetic, which made writing robust p

25、rograms, debugging, and moving programs between systems exceedingly difficult. Now the great majority of systems provide data formats and arithmetic operations according to this standard. The IEC 60559:1989 international standard was equivalent to the IEEE 754-1985 standard. Its stated goals were: 1

26、 Facilitate movement of existing programs from diverse computers to those that adhere to this standard. 2 Enhance the capabilities and safety available to programmers who, though not expert in numerical methods, may well be attempting to produce numerically sophisticated programs. However, we recogn

27、ize that utility and safety are sometimes antagonists. 3 Encourage experts to develop and distribute robust and efficient numerical programs that are portable, by way of minor editing and recompilation, onto any computer that conforms to this standard and possesses adequate capacity. When restricted

28、 to a declared subset of the standard, these programs should produce identical results on all conforming systems. 4 Provide direct support for a. Execution-time diagnosis of anomalies b. Smoother handling of exceptions c. Interval arithmetic at a reasonable cost 5 Provide for development of a. Stand

29、ard elementary functions such as exp and cos b. Very high precision (multiword) arithmetic c. Coupling of numerical and symbolic algebraic computation 6 Enable rather than preclude further refinements and extensions. To these ends, the standard specified a floating-point model comprising: formats fo

30、r binary floating-point data, including representations for Not-a-Number (NaN) and signed infinities and zeros operations basic arithmetic operations (addition, multiplication, etc.) on the format data to compose a well-defined, closed arithmetic system; also conversions between floating-point forma

31、ts and decimal character sequences, and a few auxiliary operations context status flags for detecting exceptional conditions (invalid operation, division by zero, overflow, underflow, and inexact) and controls for choosing different rounding methods The ISO/IEC/IEEE 60559:2011 international standard

32、 is equivalent to the IEEE 754-2008 standard for floating-point arithmetic, which is a major revision to IEEE 754-1985. The revised standard specifies more formats, including decimal as well as binary. It adds a 128-bit binary format to its basic formats. It defines extended formats for all of its b

33、asic formats. It specifies data interchange PD ISO/IEC TS 18661-1:2014 ISO/IEC TS 18661-1:2014(E) vi ISO/IEC 2014 All rights reservedformats (which may or may not be arithmetic), including a 16-bit binary format and an unbounded tower of wider formats. To conform to the floating-point standard, an i

34、mplementation must provide at least one of the basic formats, along with the required operations. The revised standard specifies more operations. New requirements include among others arithmetic operations that round their result to a narrower format than the operands (with just one rounding), more

35、conversions with integer types, more classifications and comparisons, and more operations for managing flags and modes. New recommendations include an extensive set of mathematical functions and seven reduction functions for sums and scaled products. The revised standard places more emphasis on repr

36、oducible results, which is reflected in its standardization of more operations. For the most part, behaviors are completely specified. The standard requires conversions between floating-point formats and decimal character sequences to be correctly rounded for at least three more decimal digits than

37、is required to distinguish all numbers in the widest supported binary format; it fully specifies conversions involving any number of decimal digits. It recommends that transcendental functions be correctly rounded. The revised standard requires a way to specify a constant rounding direction for a st

38、atic portion of code, with details left to programming language standards. This feature potentially allows rounding control without incurring the overhead of runtime access to a global (or thread) rounding mode. Other features recommended by the revised standard include alternate methods for excepti

39、on handling, controls for expression evaluation (allowing or disallowing various optimizations), support for fully reproducible results, and support for program debugging. The revised standard, like its predecessor, defines its model of floating-point arithmetic in the abstract. It neither defines t

40、he way in which operations are expressed (which might vary depending on the computer language or other interface being used), nor does it define the concrete representation (specific layout in storage, or in a processors register, for example) of data or context, except that it does define specific

41、encodings that are to be used for data that may be exchanged between different implementations that conform to the specification. IEC 60559 does not include bindings of its floating-point model for particular programming languages. However, the revised standard does include guidance for programming

42、language standards, in recognition of the fact that features of the floating-point standard, even if well supported in the hardware, are not available to users unless the programming language provides a commensurate level of support. The implementations combination of both hardware and software dete

43、rmines conformance to the floating-point standard. C support for IEC 60559 The C standard specifies floating-point arithmetic using an abstract model. The representation of a floating- point number is specified in an abstract form where the constituent components (sign, exponent, significand) of the

44、 representation are defined but not the internals of these components. In particular, the exponent range, significand size, and the base (or radix) are implementation-defined. This allows flexibility for an implementation to take advantage of its underlying hardware architecture. Furthermore, certai

45、n behaviors of operations are also implementation-defined, for example in the area of handling of special numbers and in exceptions. The reason for this approach is historical. At the time when C was first standardized, before the floating-point standard was established, there were various hardware

46、implementations of floating-point arithmetic in common use. Specifying the exact details of a representation would have made most of the existing implementations at the time not conforming. Beginning with ISO/IEC 9899:1999 (C99), C has included an optional second level of specification for implement

47、ations supporting the floating-point standard. C99, in conditionally normative Annex F, introduced nearly complete support for the IEC 60559:1989 standard for binary floating-point arithmetic. Also, C99s informative Annex G offered a specification of complex arithmetic that is compatible with IEC 60

48、559:1989. PD ISO/IEC TS 18661-1:2014 ISO/IEC TS 18661-1:2014(E) ISO/IEC 2014 All rights reserved viiISO/IEC 9899:2011 (C11) includes refinements to the C99 floating-point specification, though is still based on IEC 60559:1989. C11 upgrades Annex G from “informative” to “conditionally normative”. ISO

49、/IEC TR 24732:2009 introduced partial C support for the decimal floating-point arithmetic in ISO/IEC/IEEE 60559:2011. ISO/IEC TR 24732, for which technical content was completed while IEEE 754- 2008 was still in the later stages of development, specifies decimal types based on ISO/IEC/IEEE 60559:2011 decimal formats, though it does not include all of the operations required by ISO/IEC/IEEE 60559:2011. Purpose The purpose of ISO/IEC TS 18661 is to provide a C language binding for ISO/IEC/IEE

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1