ISO/IEC 24747:2009
(Main)Information technology - Programming languages, their environments and system software interfaces - Extensions to the C Library to support mathematical special functions
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
Overview
ISO/IEC 24747:2009 specifies standardized extensions to the C Standard Library (ISO/IEC 9899) to provide a consistent set of mathematical special functions for C programmers and library implementers. The standard adds function prototypes (with float, double and long double variants) to the headers <math.h> and <tgmath.h>, and defines preprocessor controls for exposing these facilities in a portable way.
Key topics and technical requirements
- Scope and relation to C: Extensions are defined by reference to ISO/IEC 9899; unless suppressed, the full C Standard Library is included.
- Header additions: New function declarations are added to <math.h> and <tgmath.h> when the macro STDC_WANT_MATH_SPEC_FUNCS is defined as 1 at inclusion time.
- Conformance macro: Implementations may define STDC_MATH_SPEC_FUNCS (value 200808) to indicate conformance to this International Standard.
- Function set: The standard lists numerous special functions, including (examples):
- Bessel functions: cyl_bessel_i, cyl_bessel_j, cyl_bessel_k, cyl_neumann and spherical variants
- Orthogonal polynomials: assoc_laguerre, assoc_legendre, hermite, laguerre, legendre, sph_legendre
- Elliptic integrals: comp_ellint_1/2/3 and ellint_1/2/3 (complete and incomplete)
- Special functions: beta, expint (exponential integral), riemann_zeta
- Type variants: Each function is provided in three signatures (float, double, long double), following standard C naming conventions (e.g., func, funcf, funcl).
- Error and NaN behavior: Functions must return NaN if any argument is NaN and follow the standard rules for reporting domain errors only where mathematically applicable.
- Preprocessor consistency: STDC_WANT_MATH_SPEC_FUNCS must be defined identically for all inclusions of the special-function headers within a translation unit.
Applications - who uses this standard
- Library and compiler implementers: To provide portable, standards-compliant math libraries for C runtime environments.
- Scientific and numerical computing: Researchers and engineers who need reliable implementations of special functions (Bessel, Legendre, elliptic integrals, Riemann zeta) for simulations, signal processing, physics, and computational mathematics.
- Cross-platform development: Developers writing portable C code that relies on advanced mathematical functionality can target ISO/IEC 24747:2009-compliant platforms for predictable behavior.
- Embedded and high-assurance systems: Where conformance and well-defined behavior of mathematical functions are required.
Related standards
- ISO/IEC 9899:1999 (and corrigenda) - The C programming language standard that ISO/IEC 24747 extends.
- Header semantics also interact with standard C preprocessor macros and error-handling conventions defined in the C Standard.
Keywords: ISO/IEC 24747:2009, C Standard Library extensions, mathematical special functions, math.h, tgmath.h, Bessel, Legendre, Laguerre, elliptic integrals, Riemann zeta, numerical computing, C programming.
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 2009
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.
© 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
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
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
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
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
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
INTERNATIONAL STANDARD
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
(Blank page)
2 © ISO/IEC 2009 – All rights reserved
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
(Blank page)
4 © ISO/IEC 2009 – All rights reserved
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
(Blank page)
6 © ISO/IEC 2009 – All rights reserved
4 Conformance [confor]
1 If a "shall" requirement is violated, the behavior is undefined.
© ISO/IEC 2009 – All rights reserved 7
(Blank page)
8 © ISO/IEC 2009 – All rights reserved
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
(Blank page)
10 © ISO/IEC 2009 – All rights reserved
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
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
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
...
Frequently Asked Questions
ISO/IEC 24747:2009 is a standard published by the International Organization for Standardization (ISO). Its full title is "Information technology - Programming languages, their environments and system software interfaces - Extensions to the C Library to support mathematical special functions". This standard covers: 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 .
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 .
ISO/IEC 24747:2009 is classified under the following ICS (International Classification for Standards) categories: 35.060 - Languages used in information technology. The ICS classification helps identify the subject area and facilitates finding related standards.
You can purchase ISO/IEC 24747:2009 directly from iTeh Standards. The document is available in PDF format and is delivered instantly after payment. Add the standard to your cart and complete the secure checkout process. iTeh Standards is an authorized distributor of ISO standards.
ISO/IEC 24747:2009 - 정보기술 - 프로그래밍 언어, 그들의 환경 및 시스템 소프트웨어 인터페이스 - 수학적 특수 함수를 지원하기 위한 C 라이브러리 확장 으로 이루어진 기사를 서술합니다. ISO/IEC 24747:2009는 C 표준 라이브러리의 확장을 정의하며, 이는 C 프로그래밍 언어의 국제 표준 (ISO/IEC 9899)에 의해 정의됩니다. 특정하지 않을 경우, ISO/IEC 24747:2009에는 전체 C 표준 라이브러리가 참조로 포함됩니다. ISO/IEC 24747:2009는 수학적 특수 함수를 지원하기 위해 C 표준 라이브러리에 라이브러리 확장을 정의합니다.
The article discusses ISO/IEC 24747:2009, which defines extensions to the C Standard Library to support mathematical special functions. These extensions are added to and included in the existing C Standard Library as specified in the International Standard for the C programming language (ISO/IEC 9899).
この記事は、ISO/IEC 24747:2009について説明しています。ISO/IEC 24747:2009は、Cプログラミング言語の国際標準(ISO/IEC 9899)で定義されたC標準ライブラリに数学的な特殊関数をサポートするための拡張を定義しています。特に指定されない限り、ISO/IEC 24747:2009にはC標準ライブラリ全体が参照されています。ISO/IEC 24747:2009は、数学的な特殊関数をサポートするためにC標準ライブラリに追加されるライブラリ拡張を定義しています。








Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.
Loading comments...