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

ISO/IEC 24747:2009 defines extensions to the C Standard Library that is defined in the International Standard for the C programming language (ISO/IEC 9899). Unless otherwise specified, the whole of the C Standard Library is included in ISO/IEC 24747:2009 by reference. ISO/IEC 24747:2009 defines library extensions to the C Standard Library to support Mathematical Special functions to be added to and .

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
Published
Publication Date
04-Jan-2009
Current Stage
9093 - International Standard confirmed
Completion Date
29-Apr-2021
Ref Project

Buy Standard

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

Standards Content (Sample)

INTERNATIONAL ISO/IEC
STANDARD 24747
First edition
2009-01-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 24747:2009(E)
©
ISO/IEC 2009

---------------------- Page: 1 ----------------------
ISO/IEC 24747:2009(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 2009
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 2009 – All rights reserved

---------------------- Page: 2 ----------------------
ISO/IEC 24747:2009(E)
ISO/IEC 24747:2009(E)
Contents
Contents iii
List of Tables v
Foreword vi
Introduction vii
1 Scope 1
1.1 Relation to C Standard Library Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Categories of extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Normative references 3
3 Terms, definitions, and symbols 5
4 Conformance 7
5 Predefined macro names 9
6 Mathematical special functions 11
6.1 Standard headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
6.2 Additions to header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
6.2.1 associated Laguerre polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
6.2.2 associated Legendre polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
6.2.3 beta function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
6.2.4 (complete) elliptic integral of the first kind . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
6.2.5 (complete) elliptic integral of the second kind . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
6.2.6 (complete) elliptic integral of the third kind . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
6.2.7 regular modified cylindrical Bessel functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
6.2.8 cylindrical Bessel functions (of the first kind) . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
6.2.9 irregular modified cylindrical Bessel functions . . . . . . . . . . . . . . . . . . . . . . . . . . 17
6.2.10 cylindrical Neumann functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
6.2.11 (incomplete) elliptic integral of the first kind . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
6.2.12 (incomplete) elliptic integral of the second kind . . . . . . . . . . . . . . . . . . . . . . . . . . 18
© ISO/IEC 2009 – All rights reserved
iii

---------------------- Page: 3 ----------------------
ISO/IEC 24747:2009(E)
CONTENTS CONTENTS iv
6.2.13 (incomplete) elliptic integral of the third kind . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6.2.14 exponential integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6.2.15 Hermite polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.2.16 Laguerre polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.2.17 Legendre polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.2.18 Riemann zeta function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.2.19 spherical Bessel functions (of the first kind) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.2.20 spherical associated Legendre functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.2.21 spherical Neumann functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.3 Additions to header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Bibliography 23
Index 25
© ISO/IEC 2009 – All rights reserved
iv

---------------------- Page: 4 ----------------------
ISO/IEC 24747:2009(E)
List of Tables
1 Numerical library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Additions to header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3 Additions to header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
© ISO/IEC 2009 – All rights reserved
                                                      v

---------------------- Page: 5 ----------------------
ISO/IEC 24747:2009(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 24747 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology, Subcommittee SC
22, Programming languages, their environments and system software interfaces.
© ISO/IEC 2009 – All rights reserved
vi

---------------------- Page: 6 ----------------------
ISO/IEC 24747:2009(E)
Introduction
This International Standard is divided into three major subdivisions:
— preliminary elements (clauses 1 - 4);
— indicating conformance (clause 5);
— the library facilities (clause 6).
Footnotes are provided to emphasize consequences of the rules described in that subclause or elsewhere in this In-
ternational Standard. References are used to refer to other related documents and subclauses. A bibliography lists
documents that were referred to during the preparation of this International Standard.
© ISO/IEC 2009 – All rights reserved
                                                     vii

---------------------- Page: 7 ----------------------
INTERNATIONAL STANDARD
ISO/IEC 24747:2009(E)

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

1 Scope [scop]
1.1 Relation to C Standard Library Introduction [descr]
1 This International Standard defines extensions to the C standard library that is defined in the International Standard for
the C programming language, see Clause 2.
2 Unless otherwise specified, the whole of the C Standard Library is included into this International Standard by reference,
see Clause 2.
1.2 Categories of extensions [exten]
1 This International Standard defines library extensions to the C Standard Library to support Mathematical Special func-
tions to be added to and.
Table 1: Numerical library summary
Subclause Header(s)
6.2 Additions to
6.3 Additions to
© ISO/IEC 2009 – All rights reserved 1

---------------------- Page: 8 ----------------------
ISO/IEC 24747:2009(E)
(Blank page)
2 © ISO/IEC 2009 – All rights reserved

---------------------- Page: 9 ----------------------
ISO/IEC 24747:2009(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.
2 ISO/IEC 9899:1999, Programming languages — C
3 ISO/IEC 9899:1999/Cor. 1:2001, Programming languages — C — Technical Corrigendum 1
4 ISO/IEC 9899:1999/Cor. 2:2004, Programming languages — C — Technical Corrigendum 2
5 ISO/IEC 9899:1999/Cor. 3:2007, Programming languages — C — Technical Corrigendum 3
6 ISO/IEC 2382-1:1993, Information technology — Vocabulary — Part 1: Fundamental terms
© ISO/IEC 2009 – All rights reserved 3

---------------------- Page: 10 ----------------------
ISO/IEC 24747:2009(E)
(Blank page)
4 © ISO/IEC 2009 – All rights reserved

---------------------- Page: 11 ----------------------
ISO/IEC 24747:2009(E)
3 Terms, definitions, and symbols [terms]
1 For the purposes of this document, the terms and definitions given in ISO/IEC 9899:1999 and the associated Technical
Corrigenda and ISO/IEC 2382-1 apply, see Clause 2.
© ISO/IEC 2009 – All rights reserved
 5 1

---------------------- Page: 12 ----------------------
ISO/IEC 24747:2009(E)
(Blank page)
6 © ISO/IEC 2009 – All rights reserved

---------------------- Page: 13 ----------------------
ISO/IEC 24747:2009(E)
4 Conformance [confor]
1 If a "shall" requirement is violated, the behavior is undefined.
© ISO/IEC 2009 – All rights reserved 7

---------------------- Page: 14 ----------------------
ISO/IEC 24747:2009(E)
(Blank page)
8 © ISO/IEC 2009 – All rights reserved

---------------------- Page: 15 ----------------------
ISO/IEC 24747:2009(E)
5 Predefined macro names [pred]
1 The following macro name is conditionally defined by the implementation:
__STDC_MATH_SPEC_FUNCS__ The integer constant 200808, intended to indicate conformance to this International
1)
Standard.
1)
The intention is that this will remain an integer constant of typelong int that is increased with each revision of this International Standard.
© ISO/IEC 2009 – All rights reserved 9

---------------------- Page: 16 ----------------------
ISO/IEC 24747:2009(E)
(Blank page)
10 © ISO/IEC 2009 – All rights reserved

---------------------- Page: 17 ----------------------
ISO/IEC 24747:2009(E)
6 Mathematical special functions [num.sf]
6.1 Standard headers [num.sf.header]
1 The functions declared in Clause 6 and its subclauses are not declared by their respective header if __STDC_WANT_-
MATH_SPEC_FUNCS__ is defined as a macro which expands to the integer constant0 at the point in the source file where
the appropriate header is included.
2 The functions declared in Clause 6 and its subclauses are declared by their respective headers if__STDC_WANT_MATH_-
SPEC_FUNCS__ is defined as a macro which expands to the integer constant 1 at the point in the source file where the
2)
appropriate header is included.
3 Functions declared in Clause 6 and its subclauses shall not be declared by their respective headers if __STDC_WANT_-
MATH_SPEC_FUNCS__ is not defined as a macro at the point in the source file where the appropriate header is included.
4 Within a preprocessing translation unit, __STDC_WANT_MATH_SPEC_FUNCS__ shall be defined identically for all in-
clusions of any headers from Clause 6. If __STDC_WANT_MATH_SPEC_FUNCS__ is defined differently for any such
inclusion, the implementation shall issue a diagnostic as if a preprocessor error directive was used.
6.2 Additions to header [num.sf.math]
1 Table 2 summarizes the functions that are added to header. The detailed signatures are given in the synopsis.
2 Each of these functions is provided for arguments of typefloat, double, andlong double. The signatures added to
header are:
// [6.2.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);
// [6.2.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);
// [6.2.3] beta function:
double beta(double x, double y);
float betaf(float x, float y);
long double betal(long double x, long double y);
2)
Future revisions of this International Standard may define meanings for other values of__STDC_WANT_MATH_SPEC_FUNCS__.
© ISO/IEC 2009 – All rights reserved 11 1

---------------------- Page: 18 ----------------------
ISO/IEC 24747:2009(E)
6.2 Additions to header Mathematical special functions 12
// [6.2.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);
// [6.2.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);
// [6.2.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);
// [6.2.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);
// [6.2.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);
// [6.2.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);
// [6.2.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);
// [6.2.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);
// [6.2.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);
// [6.2.13] (incomplete) elliptic integral of the third kind:
double ellint_3(double k, double nu, double phi);
float ellint_3f(float k, float nu, float phi);
long double ellint_3l(long double k, long double nu, long double phi);
12 © ISO/IEC 2009 – All rights reserved

---------------------- Page: 19 ----------------------
ISO/IEC 24747:2009(E)
13 Mathematical special functions 6.2 Additions to header
// [6.2.14] exponential integral:
double expint(double x);
float expintf(float x);
long double expintl(long double x);
// [6.2.15] Hermite polynomials:
double hermite(unsigned n, double x);
float hermitef(unsigned n, float x);
long double hermitel(unsigned n, long double x);
// [6.2.16] Laguerre polynomials:
double laguerre(unsigned n, double x);
float laguerref(unsigned n, float x);
long double laguerrel(unsigned n, long double x);
// [6.2.17] Legendre polynomials:
double legendre(unsigned l, double x);
float legendref(unsigned l, float x);
long double legendrel(unsigned l, long double x);
// [6.2.18] Riemann zeta function:
double riemann_zeta(double);
float riemann_zetaf(float);
long double riemann_zetal(long double);
// [6.2.19] spherical Bessel functions (of the first kind):
double sph_bessel(unsigned n, double x
...

Questions, Comments and Discussion

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