Information technology — Programming languages, their environments and system software interfaces — Extensions to the C++ Library to support mathematical special functions

ISO/IEC 29124:2010 specifies extensions to the C++ standard library as defined in the International Standard for the C++ programming language (ISO/IEC 14882:2003). ISO/IEC 29124:2010 specifies extensions to the C++ standard library to support mathematical special functions.

Technologies de l'information — Langages de programmation, leur environnement et interfaces des logiciels de systèmes — Extensions à la bibliothèque C++ pour supporter les fonctions mathématiques spéciales

General Information

Status
Withdrawn
Publication Date
02-Sep-2010
Withdrawal Date
02-Sep-2010
Current Stage
9599 - Withdrawal of International Standard
Completion Date
03-Sep-2021
Ref Project

Buy Standard

Standard
ISO/IEC 29124:2010 - Information technology -- Programming languages, their environments and system software interfaces -- Extensions to the C++ Library to support mathematical special functions
English language
21 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)

INTERNATIONAL ISO/IEC
STANDARD 29124
First edition
2010-09-15

Information technology — Programming
languages, their environments and
system software interfaces — Extensions
to the C++ Library to support
mathematical special functions
Technologies de l'information — Langages de programmation, leur
environnement et interfaces des logiciels de systèmes — Extensions à
la bibliothèque C++ pour supporter les fonctions mathématiques
spéciales




Reference number
ISO/IEC 29124:2010(E)
©
ISO/IEC 2010

---------------------- Page: 1 ----------------------
ISO/IEC 29124:2010(E)
PDF disclaimer
This PDF file may contain embedded typefaces. In accordance with Adobe's licensing policy, this file may be printed or viewed but
shall not be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In
downloading this file, parties accept therein the responsibility of not infringing Adobe's licensing policy. The ISO Central Secretariat
accepts no liability in this area.
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 PDF-creation
parameters were optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In
the unlikely event that a problem relating to it is found, please inform the Central Secretariat at the address given below.


COPYRIGHT PROTECTED DOCUMENT


©  ISO/IEC 2010
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means,
electronic or mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below or
ISO's member 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 copyright@iso.org
Web www.iso.org
Published in Switzerland

ii © ISO/IEC 2010 – All rights reserved

---------------------- Page: 2 ----------------------
ISO/IEC 29124:2010(E)
Contents
Contents iii
List of Tables v
Foreword vi
Introduction vii
1 Scope 1
1.1 Purpose and intent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Relation to C++ Standard Library Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Categories of extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Normative references 2
3 Terms, definitions, and symbols 3
4 Conformance 4
5 Headers 5
6 Namespaces 6
7 Macro names 7
7.1 Predefined macro name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
7.2 User-defined macro name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
8 Mathematical special functions 8
8.1 Additions to header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
8.1.1 associated Laguerre polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
8.1.2 associated Legendre polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
8.1.3 beta function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
8.1.4 (complete) elliptic integral of the first kind . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
8.1.5 (complete) elliptic integral of the second kind . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
8.1.6 (complete) elliptic integral of the third kind . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
© ISO/IEC 2010 – All rights reserved iii

---------------------- Page: 3 ----------------------
ISO/IEC 29124:2010(E)
CONTENTS CONTENTS iv
8.1.7 regular modified cylindrical Bessel functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
8.1.8 cylindrical Bessel functions (of the first kind) . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
8.1.9 irregular modified cylindrical Bessel functions . . . . . . . . . . . . . . . . . . . . . . . . . . 13
8.1.10 cylindrical Neumann functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
8.1.11 (incomplete) elliptic integral of the first kind . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
8.1.12 (incomplete) elliptic integral of the second kind . . . . . . . . . . . . . . . . . . . . . . . . . . 15
8.1.13 (incomplete) elliptic integral of the third kind . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
8.1.14 exponential integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
8.1.15 Hermite polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
8.1.16 Laguerre polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
8.1.17 Legendre polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
8.1.18 Riemann zeta function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
8.1.19 spherical Bessel functions (of the first kind) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
8.1.20 spherical associated Legendre functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
8.1.21 spherical Neumann functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
8.2 Additions to header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
8.3 The header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
8.4 The header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Bibliography 19
Index 20
iv © ISO/IEC 2010 – All rights reserved

---------------------- Page: 4 ----------------------
ISO/IEC 29124:2010(E)
List of Tables
1 Summary of affected headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 Additions to header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
© ISO/IEC 2010 – All rights reserved v

---------------------- Page: 5 ----------------------
ISO/IEC 29124:2010(E)
Foreword
ISO (the International Organization for Standardization) 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 organization 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, ISO and IEC have established a Joint Technical Committee, ISO/IEC JTC 1.
International Standards are drafted in accordance with the rules given in the ISO/IEC Directives, Part 2.
The main task of the Joint Technical Committee is to prepare International Standards. Draft International Standards
adopted by the Joint Technical Committee are circulated to national bodies for voting. Publication as an International
Standard requires approval by at least 75% of the national bodies casting a vote.
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 responsible for identifying any or all such patent rights.
ISO/IEC 29124 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology, Subcommittee
SC 22, Programming languages, their environments and system software interfaces.
vi © ISO/IEC 2010 – All rights reserved

---------------------- Page: 6 ----------------------
ISO/IEC 29124:2010(E)
Introduction
This International Standard is divided into three major subdivisions:
— preliminary elements (Clauses 1–3),
— indicating conformance (Clause 4), and
— the library facilities (Clauses 5–6).
Footnotes are provided to emphasize consequences of the rules described in that subclause or elsewhere in this International
Standard. References are used to refer to other related documents and subclauses. A bibliography lists documents that are
non-normatively cited in this International Standard, or that were referred to during its preparation.
The provisions of this International Standard are based on 5.2 (“Mathematical special functions”) of
ISO/IEC TR 19768:2007 [2]. That subclause also served as a basis for a similar International Standard [3].
Because of their common origin, it is intended that both these International Standards specify
substantially identical syntax and semantics to the extent permitted by each Standard’s programming language.
© ISO/IEC 2010 – All rights reserved vii

---------------------- Page: 7 ----------------------
INTERNATIONAL STANDARD ISO/IEC 29124:2010(E)

Information technology — Programming languages, their
environments and system software interfaces — Extensions to
the C++ Library to support mathematical special functions

1 Scope [scope]
1.1 Purpose and intent [scope.purpose]
1 This International Standard specifies extensions to the C++ standard library as defined in the International Standard for
the C++ programming language [ISO/IEC 14882:2003].
1.2 Relation to C++ Standard Library Introduction [scope.libintro]
1 Unless otherwise specified, the whole of Clause 17 (“Library Introduction”) of the ISO C++ Standard [ISO/IEC
14882:2003] is included into this International Standard by reference.
1.3 Categories of extensions [scope.ext]
1 This International Standard specifies extensions to the C++ standard library to support mathematical special functions.
© ISO/IEC 2010 – All rights reserved 1

---------------------- Page: 8 ----------------------
ISO/IEC 29124:2010(E)
2 Normative references [norm]
1 The following referenced documents are indispensable for the application of this document. For dated references, only the
edition cited applies. For undated references, the latest edition of the referenced document (including any amendments)
applies.
 ISO/IEC 2382-1:1993, Information technology — Vocabulary — Part 1: Fundamental terms
 ISO/IEC 9899:1999, Programming languages — C
 ISO/IEC 9899:1999/Cor 1:2001, Programming languages — C — Technical Corrigendum 1
 ISO/IEC 9899:1999/Cor 2:2004, Programming languages — C — Technical Corrigendum 2
 ISO/IEC 9899:1999/Cor 3:2007, Programming languages — C — Technical Corrigendum 3
 ISO/IEC 14882:2003, Programming languages — C++
 ISO 80000-2:2009, Quantities and units — Part 2: Mathematical signs and symbols to be used in the natural
sciences and technology
2 © ISO/IEC 2010 – All rights reserved

---------------------- Page: 9 ----------------------
ISO/IEC 29124:2010(E)
3 Terms, definitions, and symbols [terms]
1 For the purposes of this document, the terms and definitions given in ISO/IEC 14882:2003, ISO/IEC 9899:1999 and
its Technical Corrigenda, and ISO/IEC 2382-1:1993 apply, as do the terms, definitions, and symbols given in
ISO 80000-2:2009. Other terms are defined where they appear in italic type.
© ISO/IEC 2010 – All rights reserved 3

---------------------- Page: 10 ----------------------
ISO/IEC 29124:2010(E)
4 Conformance [confor]
1 If a "shall" requirement is violated, the behavior is undefined.
2 The constraints upon, and latitude of, implementations of the extensions specified in this International Standard are
identical to those specified in Clause 17 (“Library Introduction”) of the ISO C++ Standard [ISO/IEC 14882:2003],
previously (1.2) included into this International Standard by reference.
4 © ISO/IEC 2010 – All rights reserved

---------------------- Page: 11 ----------------------
ISO/IEC 29124:2010(E)
5 Headers [head]
1 The extensions specified by this International Standard constitute new library components that are declared as additions
to an existing standard header, as specified below. For consistency throughout the C++ standard library, adjustments to
additional headers are also specified below. For some of these headers, the adjustments are specified as applicable only if
the implementation provides the header.
2 The headers affected by this International Standard are summarized in Table 1.
Table 1: Summary of affected headers
Subclause Header(s)
8.1
8.2
8.3
8.4
1)
3 Vendors should not simply add declarations to standard headers in a way that would be visible to users by default. Users
should be required to take explicit action to have access to library extensions.
4 The visibility of the library extensions specified in Clause 8 shall be in accordance with the provisions of subclause 7.2.
1)
That would fail to be standard conforming, even within a namespace, because the new names could conflict with user macros.
© ISO/IEC 2010 – All rights reserved 5

---------------------- Page: 12 ----------------------
ISO/IEC 29124:2010(E)
6 Namespaces [ns]
1 Unless otherwise specified, all components specified in this International Standard are declared in namespacestd.
2 Unless otherwise specified, all references to components specified in the C++ standard library are assumed to be qualified
withstd::.
6 © ISO/IEC 2010 – All rights reserved

---------------------- Page: 13 ----------------------
ISO/IEC 29124:2010(E)
7 Macro names [macro]
7.1 Predefined macro name [macro.pre]
1 The following macro name shall be conditionally defined by the implementation:
2)
__STDCPP_MATH_SPEC_FUNCS__ The value201003L, intended to indicate conformance to this International Standard.
7.2 User-defined macro name [macro.user]
1 The functions declared or defined in Clause 8 are not declared or defined by their respective headers if__STDCPP_WANT_-
MATH_SPEC_FUNCS__ is defined as a macro that expands to the integer constant0 at the point in the source file where the
appropriate header is included.
2 The functions declared or defined in Clause 8 are declared and defined by their respective headers if__STDCPP_WANT_-
MATH_SPEC_FUNCS__ is defined as a macro that expands to the integer constant1 at the point in the source file where the
appropriate header is included.
3 It is implementation-defined whether the functions declared or defined in Clause 8 are declared or defined by their
respective headers if__STDCPP_WANT_MATH_SPEC_FUNCS__ is defined as a macro that expands to an integer constant
3)
other than0 or1 at the point in the source file where the appropriate header is included.
4 It is implementation-defined whether the functions declared or defined in Clause 8 are declared or defined by their
respective headers if __STDCPP_WANT_MATH_SPEC_FUNCS__ is not defined as a macro at the point in the source file
where the appropriate header is included.
5 Within a preprocessing translation unit, __STDCPP_WANT_MATH_SPEC_FUNCS__ either shall be nowhere defined as
a macro, or else shall be defined identically for all inclusions of any headers from Clause 8. If __STDCPP_WANT_-
MATH_SPEC_FUNCS__ is defined differently for any such inclusion, the implementation shall issue a diagnostic as if a
preprocessor error directive were used.
2)
It is intended that future versions of this International Standard will replace the value of this macro with a greater value of typelongint.
3)
Future revisions of this International Standard may specify meanings for other values of__STDCPP_WANT_MATH_SPEC_FUNCS__.
© ISO/IEC 2010 – All rights reserved 7

---------------------- Page: 14 ----------------------
ISO/IEC 29124:2010(E)
8 Mathematical special functions [sf]
8.1 Additions to header [sf.cmath]
1 Table 2 summarizes the functions that are added to header.
Table 2: Additions to header synopsis
Functions:
assoc_laguerre cyl_bessel_j hermite
assoc_legendre cyl_bessel_k legendre
beta cyl_neumann laguerre
comp_ellint_1 ellint_1 riemann_zeta
comp_ellint_2 ellint_2 sph_bessel
comp_ellint_3 ellint_3 sph_legendre
cyl_bessel_i expint sph_neumann
2 Each of these functions is provided for arguments of typesfloat,double, andlongdouble. The detailed signatures
added to header are:
// [8.1.1] associated Laguerre polynomials:
double assoc_laguerre(unsigned n, unsigned m, double x);
float assoc_laguerref(unsigned n, unsigned m, float x);
long double assoc_laguerrel(unsigned n, unsigned m, long double x);
// [8.1.2] associated Legendre polynomials:
double assoc_legendre(unsigned l, unsigned m, double x);
float assoc_legendref(unsigned l, unsigned m, float x);
long double assoc_legendrel(unsigned l, unsigned m, long double x);
// [8.1.3] beta function:
double beta(double x, double y);
float betaf(float x, float y);
long double betal(long double x, long double y);
// [8.1.4] (complete) elliptic integral of the first kind:
double comp_ellint_1(double k);
float comp_ellint_1f(float k);
long double comp_ellint_1l(long double k);
8 © ISO/IEC 2010 – All rights reserved

---------------------- Page: 15 ----------------------
ISO/IEC 29124:2010(E)
9 Mathematical special functions 8.1 Additions to header
// [8.1.5] (complete) elliptic integral of the second kind:
double comp_ellint_2(double k);
float comp_ellint_2f(float k);
long double comp_ellint_2l(long double k);
// [8.1.6] (complete) elliptic integral of the third kind:
double comp_ellint_3(double k, double nu);
float comp_ellint_3f(float k, float nu);
long double comp_ellint_3l(long double k, long double nu);
// [8.1.7] regular modified cylindrical Bessel functions:
double cyl_bessel_i(double nu, double x);
float cyl_bessel_if(float nu, float x);
long double cyl_bessel_il(long double nu, long double x);
// [8.1.8] cylindrical Bessel functions (of the first kind):
double cyl_bessel_j(double nu, double x);
float cyl_bessel_jf(float nu, float x);
long double cyl_bessel_jl(long double nu, long double x);
// [8.1.9] irregular modified cylindrical Bessel functions:
double cyl_bessel_k(double nu, double x);
float cyl_bessel_kf(float nu, float x);
long double cyl_bessel_kl(long double nu, long double x);
// [8.1.10] cylindrical Neumann functions;
// cylindrical Bessel functions (of the second kind):
double cyl_neumann(double nu, double x);
float cyl_neumannf(float nu, float x);
long double cyl_neumannl(long double nu, long double x);
// [8.1.11] (incomplete) elliptic integral of the first kind:
double ellint_1(double k, double phi);
float ellint_1f(float k, float phi);
long double ellint_1l(long double k, long double phi);
// [8.1.12] (incomplete) elliptic integral of the second kind:
double ellint_2(double k, double phi);
float ellint_2f(float k, float phi);
long double ellint_2l(long double k, long double phi);
// [8.1.13] (incomplete) elliptic integral of the
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.