1、Reference numberISO/IEC 10967-2:2001(E)ISO/IEC 2001Information technology Languageindependent arithmetic Part 2:Elementary numerical functionsTechnologies de linformation Arithmtique de langage indpendant Partie 2: Fonctions numriques lmentairesNational Standard of CanadaCAN/CSA-ISO/IEC 10967-2:02(I
2、SO/IEC 10967-2:2001)International Standard ISO/IEC 10967-2:2001 (first edition, 2001-08-15) has been adopted withoutmodification (IDT) as CSA Standard CAN/CSA-ISO/IEC 10967-2:02, which has been approved as a NationalStandard of Canada by the Standards Council of Canada.ISBN 1-55324-939-9 December 20
3、02The Canadian Standards Association (CSA), The Standards Council of Canada is theunder whose auspices this National Standard has been coordinating body of the National Standards system, produced, was chartered in 1919 and accredited by a federation of independent, autonomousthe Standards Council of
4、 Canada to the National organizations working towards the furtherStandards system in 1973. It is a not-for-profit, development and improvement of voluntarynonstatutory, voluntary membership association standardization in the national interest.engaged in standards development and certification The pr
5、incipal objects of the Council are to foster activities. and promote voluntary standardization as a means CSA standards reflect a national consensus of of advancing the national economy, benefiting theproducers and users including manufacturers, health, safety, and welfare of the public, assisting c
6、onsumers, retailers, unions and professional and protecting the consumer, facilitating domestic organizations, and governmental agencies. The and international trade, and furthering internationalstandards are used widely by industry and commerce cooperation in the field of standards.and often adopte
7、d by municipal, provincial, and A National Standard of Canada is a standard whichfederal governments in their regulations, particularly has been approved by the Standards Council ofin the fields of health, safety, building and Canada and one which reflects a reasonableconstruction, and the environme
8、nt. agreement among the views of a number of capableIndividuals, companies, and associations across individuals whose collective interests provide to theCanada indicate their support for CSAs standards greatest practicable extent a balance ofdevelopment by volunteering their time and skills to repre
9、sentation of producers, users, consumers, andCSA Committee work and supporting the Associations others with relevant interests, as may be appropriateobjectives through sustaining memberships. The to the subject in hand. It normally is a standardmore than 7000 committee volunteers and the 2000 which
10、is capable of making a significant and timelysustaining memberships together form CSAs total contribution to the national interest.membership from which its Directors are chosen. Approval of a standard as a National Standard ofSustaining memberships represent a major source of Canada indicates that
11、a standard conforms to theincome for CSAs standards development activities. criteria and procedures established by the StandardsThe Association offers certification and testing Council of Canada. Approval does not refer to theservices in support of and as an extension to its technical content of the
12、 standard; this remains thestandards development activities. To ensure the continuing responsibility of the accreditedintegrity of its certification process, the Association standards-development organization.regularly and continually audits and inspects products Those who have a need to apply stand
13、ards arethat bear the CSA Mark. encouraged to use National Standards of CanadaIn addition to its head office and laboratory complex whenever practicable. These standards are subject in Toronto, CSA has regional branch offices in major to periodic review; therefore, users are cautioned centres across
14、 Canada and inspection and testing to obtain the latest edition from the organizationagencies in eight countries. Since 1919, the preparing the standard.Association has developed the necessary expertise to The responsibility for approving National Standards meet its corporate mission: CSA is an inde
15、pendent of Canada rests with theservice organization whose mission is to provide an Standards Council of Canadaopen and effective forum for activities facilitating the 270 Albert Street, Suite 200exchange of goods and services through the use of Ottawa, Ontario, K1P 6N7standards, certification and r
16、elated services to meet Canadanational and international needs.For further information on CSA services, write toCanadian Standards Association5060 Spectrum Way, Suite 100Mississauga, Ontario, L4W 5N6CanadaAlthough the intended primary application of this Standard is stated in its Scope, it is import
17、antto note that it remains the responsibility of the users to judge its suitability for their particular purpose.Registered trade-mark of Canadian Standards AssociationCAN/CSA-ISO/IEC 10967-2:02 Part 2: Elementary numerical functionsInformation technology Language independent arithmetic December 200
18、2 Canadian Standards Association CSA/1CAN/CSA-ISO/IEC 10967-2:02Information technology Languageindependent arithmetic Part 2: Elementary numerical functionsCSA PrefaceStandards development within the Information Technology sector is harmonized with internationalstandards development. Through the CSA
19、 Technical Committee on Information Technology (TCIT),Canadians serve as the Canadian Advisory Committee (CAC) on ISO/IEC Joint Technical Committee 1 onInformation Technology (ISO/IEC JTC1) for the Standards Council of Canada (SCC), the ISO memberbody for Canada and sponsor of the Canadian National
20、Committee of the IEC. Also, as a member of theInternational Telecommunication Union (ITU), Canada participates in the International Telegraph andTelephone Consultative Committee (ITU-T).This International Standard was reviewed by the CSA TCIT under the jurisdiction of the StrategicSteering Committee
21、 on Information Technology and deemed acceptable for use in Canada. (Acommittee membership list is available on request from the CSA Project Manager.) From time to time,ISO/IEC may publish addenda, corrigenda, etc. The CSA TCIT will review these documents for approvaland publication. For a listing,
22、refer to the CSA Information Products catalogue or CSA Info Update orcontact a CSA Sales representative. This Standard has been formally approved, without modification, bythe Technical Committee and has been approved as a National Standard of Canada by the StandardsCouncil of Canada.December 2002 Ca
23、nadian Standards Association 2002All rights reserved. No part of this publication may be reproduced in any form whatsoever without the priorpermission of the publisher. ISO/IEC material is reprinted with permission. Where the words “thisInternational Standard” appear in the text, they should be inte
24、rpreted as “this National Standard ofCanada”. Inquiries regarding this National Standard of Canada should be addressed to Canadian Standards Association 5060 Spectrum Way, Suite 100, Mississauga, Ontario, Canada L4W 5N6 1-800-463-6727 416-747-4044www.csa.caReference numberISO/IEC 10967-2:2001(E)ISO/
25、IEC 2001INTERNATIONALSTANDARDISO/IEC10967-2First edition2001-08-15Information technology Languageindependent arithmetic Part 2:Elementary numerical functionsTechnologies de linformation Arithmtique de langage indpendant Partie 2: Fonctions numriques lmentairesISO/IEC 10967-2:2001(E)PDF disclaimerThi
26、s PDF file may contain embedded typefaces. In accordance with Adobes licensing policy, this file may be printed or viewed but shall notbe edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In downloading thisfile, parties accept there
27、in the responsibility of not infringing Adobes licensing policy. The ISO Central Secretariat accepts no liability in thisarea.Adobe is a trademark of Adobe Systems Incorporated.Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PD
28、F-creation parameterswere optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In the unlikely eventthat a problem relating to it is found, please inform the Central Secretariat at the address given below. ISO/IEC 2001All rights reserved
29、. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means, electronicor mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below or ISOs member bodyin the country of the requester.IS
30、O copyright officeCase postale 56 Gb7 CH-1211 Geneva 20Tel. + 41 22 749 01 11Fax + 41 22 749 09 47E-mail copyrightiso.chWeb www.iso.chii ISO/IEC 2001 All rights reservedc ISO/IEC 2001 All rights reserved ISO/IEC 10967-2:2001(E)ContentsForeword . . . . . . . . . . . . . . . . . . . . . . . . . . . .
31、. . . . . . . . . . . . . . . . viiiIntroduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix1 Scope 11.1 Inclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Exclusions . . . . . . . . . . . . . . . . . . . . .
32、 . . . . . . . . . . . . . . . . . . . . 22 Conformity 23 Normative references 34 Symbols and de nitions 44.1 Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44.1.1 Sets and intervals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44.1.2
33、 Operators and relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44.1.3 Mathematical functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54.1.4 Exceptional values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54.1.5 Datatypes . . . . . . . . . . .
34、. . . . . . . . . . . . . . . . . . . . . . . . . . 64.2 De nitions of terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Speci cations for integer and oating point operations 105.1 Basic integer operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35、 . 105.1.1 The integer result and wrap helper functions . . . . . . . . . . . . . . . . . 105.1.2 Integer maximum and minimum . . . . . . . . . . . . . . . . . . . . . . . . 115.1.3 Integer diminish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115.1.4 Integer power and arithmeti
36、c shift . . . . . . . . . . . . . . . . . . . . . . . 125.1.5 Integer square root . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125.1.6 Divisibility tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125.1.7 Integer division (with oor, round, or ceiling) and re
37、mainder . . . . . . . . 135.1.8 Greatest common divisor and least common positive multiple . . . . . . . . 135.1.9 Support operations for extended integer range . . . . . . . . . . . . . . . . . 145.2 Basic oating point operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.2.1 The
38、 rounding and oating point result helper functions . . . . . . . . . . . 155.2.2 Floating point maximum and minimum . . . . . . . . . . . . . . . . . . . . 175.2.3 Floating point diminish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185.2.4 Floor, round, and ceiling . . . . . . . . . .
39、. . . . . . . . . . . . . . . . . . . 195.2.5 Remainder after division with round to integer . . . . . . . . . . . . . . . . 205.2.6 Square root and reciprocal square root . . . . . . . . . . . . . . . . . . . . . 205.2.7 Multiplication to higher precision oating point datatype . . . . . . . . . . 2
40、05.2.8 Support operations for extended oating point precision . . . . . . . . . . . 215.3 Elementary transcendental oating point operations . . . . . . . . . . . . . . . . . 225.3.1 Maximum error requirements . . . . . . . . . . . . . . . . . . . . . . . . . . 225.3.2 Sign requirements . . . . . . .
41、 . . . . . . . . . . . . . . . . . . . . . . . . . 235.3.3 Monotonicity requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.3.4 The result helper function . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.3.5 Hypotenuse . . . . . . . . . . . . . . . . . . . . . . . . . . .
42、 . . . . . . . . . 245.3.6 Operations for exponentiations and logarithms . . . . . . . . . . . . . . . . 24iiiISO/IEC 10967-2:2001(E)c ISO/IEC 2001 All rights reserved5.3.6.1 Integer power of argument base . . . . . . . . . . . . . . . . . . . 245.3.6.2 Natural exponentiation . . . . . . . . . . . .
43、 . . . . . . . . . . . . 255.3.6.3 Natural exponentiation, minus one . . . . . . . . . . . . . . . . . . 265.3.6.4 Exponentiation of 2 . . . . . . . . . . . . . . . . . . . . . . . . . . 275.3.6.5 Exponentiation of 10 . . . . . . . . . . . . . . . . . . . . . . . . . 275.3.6.6 Exponentiation of argu
44、ment base . . . . . . . . . . . . . . . . . . . 285.3.6.7 Exponentiation of one plus the argument base, minus one . . . . . 295.3.6.8 Natural logarithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 295.3.6.9 Natural logarithm of one plus the argument . . . . . . . . . . . . . 305.3.6.10 2-lo
45、garithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305.3.6.11 10-logarithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315.3.6.12 Argument base logarithm . . . . . . . . . . . . . . . . . . . . . . . 315.3.6.13 Argument base logarithm of one plus each argument . .
46、. . . . . . 325.3.7 Introduction to operations for trigonometric elementary functions . . . . . . 325.3.8 Operations for radian trigonometric elementary functions . . . . . . . . . . 335.3.8.1 Radian angle normalisation . . . . . . . . . . . . . . . . . . . . . . 345.3.8.2 Radian sine . . . . . . .
47、. . . . . . . . . . . . . . . . . . . . . . . . 355.3.8.3 Radian cosine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355.3.8.4 Radian tangent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365.3.8.5 Radian cotangent . . . . . . . . . . . . . . . . . . . . . . . . . . . 365.3.
48、8.6 Radian secant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375.3.8.7 Radian cosecant . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375.3.8.8 Radian cosine with sine . . . . . . . . . . . . . . . . . . . . . . . . 385.3.8.9 Radian arc sine . . . . . . . . . . . . . . . . .
49、. . . . . . . . . . . 385.3.8.10 Radian arc cosine . . . . . . . . . . . . . . . . . . . . . . . . . . . 385.3.8.11 Radian arc tangent . . . . . . . . . . . . . . . . . . . . . . . . . . 395.3.8.12 Radian arc cotangent . . . . . . . . . . . . . . . . . . . . . . . . . 405.3.8.13 Radian arc secant . . . . . . . . . . . . . . . . . . . . . . . . . . . 415.3.8.14 Radian arc cosecant . . . . . . . . . . . . . . . . . . . . . . . . . . 415.3.8.15 Radian angle from Cartesian co-ordinates . . . . . . . . . . . . . . 425.3.9 Operations for