ISO/IEC TS 18661-4:2015
(Main)Information Technology - Programming languages, their environments, and system software interfaces - Floating-point extensions for C - Part 4: Supplementary functions
Information Technology - Programming languages, their environments, and system software interfaces - Floating-point extensions for C - Part 4: Supplementary functions
ISO/IEC TS 18661-4:2015 extends programming language C to include functions specified and recommended in ISO/IEC/IEEE 60559:2011.
Technologies de l'information — Langages de programmation, leurs environnements et interfaces du logiciel système — Extensions à virgule flottante pour C — Partie 4: Fonctions supplémentaires
General Information
Relations
Overview
ISO/IEC TS 18661-4:2015 - "Floating-point extensions for C - Part 4: Supplementary functions" is a Technical Specification that extends the C programming language to incorporate the mathematical and reduction functions recommended by ISO/IEC/IEEE 60559:2011 (the modern IEEE 754 / IEC 60559 floating‑point standard). Published in 2015, this TS specifies how supplementary floating‑point functions and related headers should be provided by C implementations to better support IEC 60559 features, reproducible numerical behavior, and advanced floating‑point operations.
Key topics and requirements
- Scope and conformance: Defines conformance rules for hosted and freestanding C implementations, required predefined macros and standard headers when supporting IEC 60559 features.
- Operation binding and behavior: Specifies how floating‑point operations are to be bound and how implementation-defined behavior interacts with the floating‑point model.
- Mathematical functions in <math.h>: Extends the standard C math library to include functions specified or recommended by the IEC 60559/IEEE 754:2011 revision (transcendental and related routines).
- Reduction functions in <math.h>: Adds reduction operations (for sums and scaled products) that improve accuracy and reproducibility for aggregate computations.
- Support headers and utilities: Addresses future directions for <complex.h>, use of type‑generic macros in <tgmath.h>, and constant rounding modes in <fenv.h>.
- Reproducibility and rounding control: Emphasizes mechanisms to control rounding (including constant rounding modes) and improve reproducible results across platforms.
- Implementation guidance: Notes constraints for freestanding implementations and details on standard headers and macros needed for compliance.
Applications and who uses it
ISO/IEC TS 18661-4:2015 is directly relevant to:
- Compiler vendors and standard library implementers - to add or standardize math and reduction functions consistent with IEC 60559.
- Library authors for numerical and scientific software - for portable, correctly‑specified floating‑point routines.
- Embedded and real‑time systems developers - where freestanding C implementations must support precise floating‑point behavior.
- High‑performance computing and data‑analysis teams - seeking reproducible reductions and correctly rounded mathematical functions.
- Safety‑critical and financial applications - that require strict floating‑point semantics, controlled rounding, and standardized exception handling.
Practical benefits include improved portability of numerical code, better reproducibility of results across platforms, and alignment of C implementations with modern floating‑point standards.
Related standards
- ISO/IEC 9899:2011 (C11) - base C standard extended by the TS
- ISO/IEC/IEEE 60559:2011 - floating‑point arithmetic (equivalent to IEEE 754‑2008)
- Other parts of the series: ISO/IEC TS 18661‑1..5 (binary/decimal arithmetic, interchange types, supplementary attributes)
Keywords: ISO/IEC TS 18661-4:2015, floating-point extensions for C, IEC 60559, IEEE 754, <math.h>, reduction functions, <fenv.h>, reproducible floating-point, C standard library.
Frequently Asked Questions
ISO/IEC TS 18661-4:2015 is a technical specification published by the International Organization for Standardization (ISO). Its full title is "Information Technology - Programming languages, their environments, and system software interfaces - Floating-point extensions for C - Part 4: Supplementary functions". This standard covers: ISO/IEC TS 18661-4:2015 extends programming language C to include functions specified and recommended in ISO/IEC/IEEE 60559:2011.
ISO/IEC TS 18661-4:2015 extends programming language C to include functions specified and recommended in ISO/IEC/IEEE 60559:2011.
ISO/IEC TS 18661-4:2015 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.
ISO/IEC TS 18661-4:2015 has the following relationships with other standards: It is inter standard links to ISO/IEC TS 18661-4:2025. Understanding these relationships helps ensure you are using the most current and applicable version of the standard.
You can purchase ISO/IEC TS 18661-4:2015 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.
Standards Content (Sample)
TECHNICAL ISO/IEC TS
SPECIFICATION 18661-4
First edition
2015-10-01
Information Technology —
Programming languages, their
environments, and system software
interfaces — Floating-point
extensions for C —
Part 4:
Supplementary functions
Technologies de l’information — Langages de programmation, leurs
environnements et interfaces du logiciel système — Extensions à
virgule flottante pour C —
Partie 4: Fonctions supplémentaires
Reference number
©
ISO/IEC 2015
© ISO/IEC 2015, Published in Switzerland
All rights reserved. Unless otherwise specified, no 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 ISO’s member body in the country of
the requester.
ISO copyright office
Ch. de Blandonnet 8 • CP 401
CH-1214 Vernier, Geneva, Switzerland
Tel. +41 22 749 01 11
Fax +41 22 749 09 47
copyright@iso.org
www.iso.org
ii © ISO/IEC 2015 – All rights reserved
ISO/IEC
TS
18661-‐4:2015(E)
Foreword
.......................................................................................................................................................................
iv
Introduction
.................................................................................................................................................................
vi
Scope
.........................................................................................................................................................................
Conformance
..........................................................................................................................................................
Normative
references
.........................................................................................................................................
Terms
and
definitions
........................................................................................................................................
C
standard
conformance
....................................................................................................................................
5.1
Freestanding
implementations
....................................................................................................................
5.2
Predefined
macros
...........................................................................................................................................
5.3
Standard
headers
..............................................................................................................................................
Operation
binding
................................................................................................................................................
Mathematical
functions
in
...........................................................................................................
Reduction
functions
in
................................................................................................................
Future
directions
for
...........................................................................................................
Type-‐generic
macros
...........................................................................................................
Constant
rounding
modes
.......................................................................................................
Bibliography
................................................................................................................................................................
©
ISO/IEC
–
All
rights
reserved
iii
ISO/IEC
TS
18661-‐4:2015(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.
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
document
should
be
noted.
This
document
was
drafted
in
accordance
with
the
editorial
rules
of
the
ISO/IEC
Directives,
Part
(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
responsible
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
given
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
ISO's
adherence
to
the
WTO
principles
in
the
Technical
Barriers
to
Trade
(TBT)
see
the
following
URL:
Foreword
-‐
Supplementary
information
The
committee
responsible
for
this
document
is
ISO/IEC
JTC
1,
Information
technology,
Subcommittee
SC
22,
Programming
languages,
their
environments,
and
system
software
interfaces.
ISO/IEC
TS
consists
of
the
following
parts,
under
the
general
title
Information
technology
—
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
The
following
part
is
under
preparation:
⎯ Part
5:
Supplementary
attributes
ISO/IEC
TS
18661-‐1
updates
ISO/IEC
9899:2011,
Information
technology
—
Programming
Language
C,
annex
F
in
particular,
to
support
all
required
features
of
ISO/IEC/IEEE
60559:2011,
Information
technology
—
Microprocessor
Systems
—
Floating-‐point
arithmetic.
ISO/IEC
TS
18661-‐2
supersedes
ISO/IEC
TR
24732:2009,
Information
technology
—
Programming
languages,
their
environments
and
system
software
interfaces
—
Extension
for
the
programming
language
C
to
support
decimal
floating-‐point
arithmetic.
iv
©
ISO/IEC
–
All
rights
reserved
ISO/IEC
TS
18661-‐4:2015(E)
ISO/IEC
TS
18661O-3,
ISO/IEC
TS
18661O-4,
and
ISO/IEC
TS
18661O-5
specify
extensions
to
ISO/IEC
9899:2011
for
features
recommended
in
ISO/IEC/IEEE
60559:2011.
©
ISO/IEC
–
All
rights
reserved
v
ISO/IEC
TS
18661-‐4:2015(E)
Introduction
Background
IEC
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
programs,
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
the
following:
1 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
recognize
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
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. Standard
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
the
following:
— formats
–
for
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
specified
conversions
between
floating-‐
point
formats
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
vi
©
ISO/IEC
–
All
rights
reserved
ISO/IEC
TS
18661-‐4:2015(E)
The
ISO/IEC/IEEE
60559:2011
international
standard
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
basic
formats.
It
specifies
data
interchange
formats
(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
implementation
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
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
reproducible
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
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
static
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
exception
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
the
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
processor's
register,
for
example)
of
data
or
context,
except
that
it
does
define
specific
encodings
that
are
to
be
used
for
the
exchange
of
floating-‐point
data
between
different
implementations
that
conform
to
the
specification.
IEC
does
not
include
bindings
of
its
floating-‐point
model
for
particular
programming
languages.
However,
the
revised
standard
does
include
guidance
for
programming
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
implementation’s
combination
of
both
hardware
and
software
determines
conformance
to
the
floating-‐point
standard.
C
support
for
IEC
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
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,
certain
behaviors
of
operations
are
also
implementation-‐defined,
for
example
in
the
area
of
handling
of
special
numbers
and
in
exceptions.
©
ISO/IEC
–
All
rights
reserved
vii
ISO/IEC
TS
18661-‐4:2015(E)
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
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
implementations
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,
C99’s
informative
annex
G
offered
a
specification
of
complex
arithmetic
that
is
compatible
with
IEC
60559:1989.
ISO/IEC
9899:2011
(C11)
includes
refinements
to
the
C99
floating-‐point
specification,
though
it
is
still
based
on
IEC
60559:1989.
C11
upgraded
annex
G
from
“informative”
to
“conditionally
normative”.
ISO/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
is
to
provide
a
C
language
binding
for
ISO/IEC/IEEE
60559:2011,
based
on
the
C11
standard,
that
delivers
the
goals
of
ISO/IEC/IEEE
to
users
and
is
feasible
to
implement.
It
is
organized
into
five
parts.
ISO/IEC
TS
18661-1
provides
changes
to
C11
that
cover
all
the
requirements,
plus
some
basic
recommendations,
of
ISO/IEC/IEEE
60559:2011
for
binary
floating-‐point
arithmetic.
C
implementations
intending
to
support
ISO/IEC/IEEE
60559:2011
are
expected
to
conform
to
conditionally
normative
annex
F
as
enhanced
by
the
changes
in
ISO/IEC
TS
18661-1.
ISO/IEC
TS
18661-2
enhances
ISO/IEC
TR
to
cover
all
the
requirements,
plus
some
basic
recommendations,
of
ISO/IEC/IEEE
60559:2011
for
decimal
floating-‐point
arithmetic.
C
implementations
intending
to
provide
an
extension
for
decimal
floating-‐point
arithmetic
supporting
ISO/IEC/IEEE
60559:2011
are
expected
to
conform
to
ISO/IEC
TS
18661-2.
ISO/IEC
TS
18661-3
(Interchange
and
extended
types),
ISO/IEC
TS
18661-4
(Supplementary
functions),
and
ISO/IEC
TS
18661-5
(Supplementary
attributes)
cover
recommended
features
of
ISO/IEC/IEEE
60559:2011.
C
implementations
intending
to
provide
extensions
for
these
features
are
expected
to
conform
to
the
corresponding
parts.
Additional
background
on
supplementary
functions
This
document
uses
the
term
supplementary
functions
to
refer
to
functions
that
provide
operations
recommended,
but
not
required,
by
IEC
60559.
ISO/IEC/IEEE
60559:2011
specifies
and
recommends
a
more
extensive
set
of
mathematical
operations
than
C11
provides.
The
IEC
specification
is
generally
consistent
with
C11,
though
it
adds
requirements
for
symmetry
and
antisymmetry.
This
part
of
ISO/IEC
TS
extends
the
specification
in
Library
subclause
7.12
Mathematics
to
include
the
complete
set
of
IEC
mathematical
operations.
For
implementations
conforming
to
annex
F,
it
also
requires
full
IEC
semantics,
including
symmetry
and
antisymmetry
properties.
viii
©
ISO/IEC
–
All
rights
reserved
ISO/IEC
TS
18661-‐4:2015(E)
IEC
requires
correct
rounding
for
its
required
operations
(squareRoot,
fusedMultiplyAdd,
etc.),
and
recommends
correct
rounding
for
its
recommended
mathematical
operations.
This
part
of
ISO/IEC
TS
reserves
identifiers,
with
cr
prefixes,
for
C
functions
corresponding
to
correctly
rounded
versions
of
the
IEC
mathematical
operations,
which
may
be
provided
at
the
option
of
the
implementation.
For
example,
the
identifier
crexp
is
reserved
for
a
correctly
rounded
version
of
the
exp
function.
IEC
also
specifies
and
recommends
reduction
operations,
which
operate
on
vector
operands.
These
operations,
which
compute
sums
and
products,
may
associate
in
any
order
and
may
evaluate
in
any
wider
format.
Hence,
unlike
other
IEC
operations,
they
do
not
have
unique
specified
results.
This
part
of
ISO/IEC
TS
extends
the
specification
in
Library
subclause
7.12
Mathematics
to
include
functions
corresponding
to
the
IEC
reduction
operations.
For
implementations
conforming
to
annex
F,
it
also
requires
the
IEC
specified
behavior
for
floating-‐point
exceptions.
©
ISO/IEC
–
All
rights
reserved
ix
TECHNICAL
SPECIFICATION
ISO/IEC/TS
18661-‐4:2015(E)
Information
technology
—
Programming
languages,
their
environments,
and
system
software
interfaces
—
Floating-‐point
extensions
for
C
—
Part
4:
Supplementary
functions
Scope
This
part
of
ISO/IEC
TS
extends
programming
language
C
to
include
functions
specified
and
recommended
in
ISO/IEC/IEEE
60559:2011.
Conformance
An
implementation
conforms
to
this
part
of
ISO/IEC
TS
if
a) it
meets
the
requirements
for
a
conforming
implementation
of
C11
with
all
the
changes
to
C11
as
specified
in
parts
1-‐4
of
ISO/IEC
TS
18661;
b) it
conforms
to
ISO/IEC
TS
18661-‐1
or
ISO/IEC
TS
18661-‐2
(or
both);
and
c) it
defines
__STDC_IEC_60559_FUNCS__
to
201506L.
Normative
references
The
following
documents,
in
whole
or
in
part,
are
normatively
referenced
in
this
document
and
are
indispensable
for
its
application.
For
dated
references,
only
the
edition
cited
applies.
For
undated
references,
the
latest
edition
of
the
referenced
document
(including
any
amendments)
applies.
ISO/IEC
9899:2011,
Information
technology
—
Programming
languages
—
C
ISO/IEC/IEEE
60559:2011,
Information
technology
—
Microprocessor
Systems
—
Floating-‐point
arithmetic
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
arithmetic
ISO/IEC
TS
18661-‐2:2015,
Information
technology
—
Programming
languages,
their
environments
and
system
software
interfaces
—
Floating-‐point
extensions
for
C
—
Part
2:
Decimal
floating-‐point
arithmetic
ISO/IEC
TS
18661-‐3:2015,
Information
technology
—
Programming
languages,
their
environments
and
system
software
interfaces
—
Floating-‐point
extensions
for
C
—
Part
3:
Interchange
and
extended
types
©
ISO/IEC
–
All
rights
reserved
ISO/IEC
TS
18661-‐4:2015(E)
Terms
and
definitions
For
the
purposes
of
this
document,
the
terms
and
definitions
given
in
ISO/IEC
9899:2011,
ISO/IEC/IEEE
60559:2011,
ISO/IEC
TS
18661-‐1:2014,
ISO/IEC
TS
18661-‐2:2015,
ISO/IEC
TS
18661-‐3:2015,
and
the
following
apply.
4.1
C11
standard
ISO/IEC
9899:2011,
Information
technology
—
Programming
languages
C,
including
Technical
Corrigendum
(ISO/IEC
9899:2011/Cor.
1:2012)
C
standard
conformance
5.1
Freestanding
implementations
The
specification
in
C11
+
TS18661-‐1
+
TS18661-‐2
allows
freestanding
implementations
to
conform
to
this
part
of
ISO/IEC
TS
18661.
5.2
Predefined
macros
Change
to
C11
+
TS18661-‐1
+
TS18661-‐2
+
TS18661-‐3:
In
6.10.8.3#1,
add:
__STDC_IEC_60559_FUNCS__
The
integer
constant
201506L,
intended
to
indicate
support
of
functions
specified
and
recommended
in
IEC
60559.
5.3
Standard
headers
The
new
identifiers
added
to
C11
library
headers
by
this
Part
of
Technical
Specification
are
defined
or
declared
by
their
respective
headers
only
if
__STDC_WANT_IEC_60559_FUNCS_EXT__ is
defined
as
a
macro
at
the
point
in
the
source
file
where
the
appropriate
header
is
first
included.
The
following
changes
to
C11
+
TS18661-‐1
+
TS18661-‐2
+
TS18661-‐3
list
these
identifiers
in
each
applicable
library
subclause.
Changes
to
C11
+
TS18661-‐1
+
TS18661-‐2
+
TS18661-‐3:
In
7.12,
renumber
paragraph
1e
to
1h,
and
after
paragraph
1d
insert
the
paragraphs:
[1e]
The
following
identifiers
are
declared
only
if
__STDC_WANT_IEC_60559_FUNCS_EXT__
is
defined
as
a
macro
at
the
point
in
the
source
file
where
is
first
included:
exp2m1 rootnf sinpil
exp2m1f rootnl tanpi
exp2m1l pown tanpif
exp10 pownf tanpil
exp10f pownl reduc_sum
exp10l powr reduc_sumf
exp10m1 powrf reduc_suml
exp10m1f powrl reduc_sumabs
exp10m1l acospi reduc_sumabsf
logp1 acospif reduc_sumabsl
logp1f acospil reduc_sumsq
©
ISO/IEC
–
All
rights
reserved
ISO/IEC
TS
18661-‐4:2015(E)
logp1l asinpi reduc_sumsqf
log2p1 asinpif reduc_sumsql
log2p1f asinpil reduc_sumprod
log2p1l atanpi reduc_sumprodf
log10p1 atanpif reduc_sumprodl
log10p1f atanpil scaled_prod
log10p1l atan2pi scaled_prodf
rsqrt atan2pif scaled_prodl
rsqrtf atan2pil scaled_prodsum
rsqrtl cospi scaled_prodsumf
compoundn cospif scaled_prodsuml
compoundnf cospil scaled_proddiff
compoundnl sinpi scaled_proddifff
rootn sinpif scaled_proddiffl
[1f]
The
following
identifiers
are
declared
only
if
__STDC_WANT_IEC_60559_DFP_EXT__
and
__STDC_WANT_IEC_60559_FUNCS_EXT__
are
defined
as
macros
at
the
point
in
the
source
file
where
is
first
included:
for
supported
types
_DecimalN,
where
N
=
32,
64,
and
128:
exp2m1dN powndN tanpidN
exp10dN powrdN reduc_sumdN
exp10m1dN acospidN reduc_sumabsdN
logp1dN asinpidN reduc_sumsqdN
log2p1dN atanpidN reduc_sumproddN
log10p1dN atan2pidN scaled_proddN
rsqrtdN cospidN scaled_prodsumdN
compoundndN sinpidN scaled_proddiffdN
rootndN
[1g]
The
following
identifiers
are
declared
only
if
__STDC_WANT_IEC_60559_TYPES_EXT__
and
__STDC_WANT_IEC_60559_FUNCS_EXT__
are
defined
as
macros
at
the
point
in
the
source
file
where
is
first
included:
for
supported
types
_FloatN:
exp2m1fN pownfN tanpifN
exp10fN powrfN reduc_sumfN
exp10m1fN acospifN reduc_sumabsfN
logp1fN asinpifN reduc_sumsqfN
log2p1fN atanpifN reduc_sumprodfN
log10p1fN atan2pifN scaled_prodfN
rsqrtfN cospifN scaled_prodsumfN
compoundnfN sinpifN scaled_proddifffN
rootnfN
©
ISO/IEC
–
All
rights
reserved
ISO/IEC
TS
18661-‐4:2015(E)
for
supported
types
_FloatNx:
exp2m1fNx pownfNx tanpifNx
exp10fNx powrfNx reduc_sumfNx
exp10m1fNx acospifNx reduc_sumabsfNx
logp1fNx asinpifNx reduc_sumsqfNx
log2p1fNx atanpifNx reduc_sumprodfNx
log10p1fNx atan2pifNx scaled_prodfNx
rsqrtfNx cospifNx scaled_prodsumfNx
compoundnfNx sinpifNx scaled_proddifffNx
rootnfNx
for
supported
types
_DecimalN,
where
N
≠
32,
64,
and
128:
exp2m1dN powndN tanpidN
exp10dN powrdN reduc_sumdN
exp10m1dN acospidN reduc_sumabsdN
logp1dN asinpidN reduc_sumsqdN
log2p1dN atanpidN reduc_sumproddN
log10p1dN atan2pidN scaled_proddN
rsqrtdN cospidN scaled_prodsumdN
compoundndN sinpidN scaled_proddiffdN
rootndN
for
supported
types
_DecimalNx:
exp2m1dNx powndNx tanpidNx
exp10dNx powrdNx reduc_sumdNx
exp10m1dNx acospidNx reduc_sumabsdNx
logp1dNx asinpidNx reduc_sumsqdNx
log2p1dNx atanpidNx reduc_sumproddNx
log10p1dNx atan2pidNx scaled_proddNx
rsqrtdNx cospidNx scaled_prodsumdNx
compoundndNx sinpidNx scaled_proddiffdNx
rootndNx
After
7.25#1c,
insert
the
paragraph:
[1d]
The
following
identifiers
are
defined
as
type-‐generic
macros
only
if
__STDC_WANT_IEC_60559_FUNCS_EXT__
is
defined
as
a
macro
at
the
point
in
the
source
file
where
is
first
included:
exp2m1 rsqrt asinpi
exp10 compoundn atanpi
exp10m1 rootn atan2pi
logp1 pown cospi
log2p1 powr sinpi
log10p1 acospi tanpi
©
ISO/IEC
–
All
rights
reserved
ISO/IEC
TS
18661-‐4:2015(E)
Operation
binding
The
following
change
to
C11
+
TS18661-‐1
+
TS18661-‐2
+
TS18661-‐3
shows
how
functions
in
C11
and
in
this
Part
of
Technical
Specification
provide
operations
recommended
in
IEC
60559.
Change
to
C11
+
TS18661-‐1
+
TS18661-‐2
+
TS18661-‐3:
After
F.3#22,
add:
[23]
The
C
functions
in
the
following
table
provide
operations
recommended
by
IEC
and
similar
operations.
Correct
rounding,
which
IEC
specifies
for
its
operations
(except
for
the
reduction
operations),
is
not
required
for
the
C
functions
in
the
table.
See
also
7.31.6a.
IEC
operation
C
function
Clauses
-‐
C11
exp
exp
7.12.6.1,
F.10.3.1
expm1
expm1
7.12.6.3,
F.10.3.3
exp2
exp2
7.12.6.2,
F.10.3.2
exp2m1
exp2m1
7.12.6.14,
F.10.3.14
exp10
7.12.6.15,
F.10.3.15
exp10
exp10m1 7.12.6.16,
F.10.3.16
exp10m1
log
log
7.12.6.7,
F.10.3.7
log2
log2
7.12.6.10,
F.10.3.10
log10
log10
7.12.6.8,
F.10.3.8
logp1
log1p,
logp1 7.12.6.9,
F.10.3.9
log2p1
log2p1
7.12.6.17,
F.10.3.17
log10p1
log10p1
7.12.6.18,
F.10.3.18
hypot
hypot
7.12.7.3,
F.10.4.3
rsqrt
rSqrt
7.12.7.6,
F.10.4.6
compoundn
compound
7.12.7.7,
F.10.4.7
rootn
rootn
7.12.7.8,
F.10.4.8
pown
pown
7.12.7.9,
F.10.4.9
pow
pow
7.12.7.4,
F.10.4.4
powr
powr
7.12.7.10,
F.10.4.10
sin
sin
7.12.4.6,
F.10.1.6
cos
cos
7.12.4.5,
F.10.1.5
tan
tan
7.12.4.7,
F.10.1.7
sinpi
sinPi
7.12.4.13,
F.10.1.13
cospi
cosPi
7.12.4.12,
F.10.1.12
tanpi
7.12.4.14,
F.10.1.14
asinpi
7.12.4.9,
F.10.1.9
acospi
7.12.4.8,
F.10.1.8
atanpi
atanPi
7.12.4.10,
F.10.1.10
atan2pi
atan2Pi
7.12.4.11,
F.10.1.11
asin
asin
7.12.4.2,
F.10.1.2
acos
acos
7.12.4.1,
F.10.1.1
atan
atan
7.12.4.3,
F.10.1.3
atan2
atan2
7.12.4.4,
F.10.1.4
sinh
sinh
7.12.5.5,
F.10.2.5
cosh
cosh
7.12.5.4,
F.10.2.4
tanh
tanh
7.12.5.6,
F.10.2.6
asinh
asinh
7.12.5.2,
F.10.2.2
acosh
acosh
7.12.5.1,
F.10.2.1
©
ISO/IEC
–
All
rights
reserved
ISO/IEC
TS
18661-‐4:2015(E)
atanh
atanh
7.12.5.3,
F.10.2.3
reduc_sum
sum
7.12.13b.1,
F.10.10b.1
reduc_sumprod
dot
7.12.13b.4,
F.10.10b.4
reduc_sumsq
sumSquare
7.12.13b.3,
F.10.10b.3
reduc_sumabs
sumAbs
7.12.13b.2,
F.10.13b.2
scaled_prod
scaledProd
7.12.13b.5,
F.10.10b.5
scaled_prodsum
scaledProdSum
7.12.13b.6,
F.10.10b.6
scaled_proddiff
scaledProdDiff
7.12.13b.7,
F.10.10b.7
Mathematical
functions
in
This
clause
specifies
changes
to
C11
+
TS18661-‐1
+
TS18661-‐2
+
TS18661-‐3
to
include
functions
that
support
mathematical
operations
recommended
by
IEC
60559.
The
changes
reserve
names
for
correctly
rounded
versions
of
the
functions.
IEC
recommends
support
for
the
correctly
rounded
functions.
The
changes
also
support
the
symmetry
and
antisymmetry
properties
that
IEC
specifies
for
mathematical
functions.
After
7.12.4.7,
insert
the
following:
7.12.4.8
The
acospi
functions
Synopsis
[1]
#include
double acospi(double x);
float acospif(float x);
long double acospil(long double x);
_FloatN acospifN(_FloatN x);
_FloatNx acospifNx(_FloatNx x);
_DecimalN acospidN(_DecimalN x);
_DecimalNx acospidNx(_DecimalNx x);
Description
[2]
The
acospi
functions
compute
the
principal
value
of
the
arc
cosine
of
x,
divided
by
π,
thus
measuring
the
angle
in
half-‐revolutions.
A
domain
error
occurs
for
arguments
not
in
the
interval
[−1,
+1].
Returns
[3]
The
acospi
functions
return
arccos(x)/π,
in
the
interval
[0,
1].
©
ISO/IEC
–
All
rights
reserved
ISO/IEC
TS
18661-‐4:2015(E)
7.12.4.9
The
asinpi
functions
Synopsis
[1]
#include
double asinpi(double x);
float asinpif(float x);
long double asinpil(long double x);
_FloatN asinpifN(_FloatN x);
_FloatNx asinpifNx(_FloatNx x);
_DecimalN asinpidN(_DecimalN x);
_DecimalNx asinpidNx(_DecimalNx x);
Description
[2]
The
asinpi
functions
compute
the
principal
value
of
the
arc
sine
of
x,
divided
by
π,
thus
measuring
the
angle
in
half-‐revolutions.
A
domain
error
occurs
for
arguments
not
in
the
interval
[−1,
+1].
A
range
error
occurs
if
the
magnitude
of
nonzero
x
is
too
small.
Returns
[3]
The
asinpi
functions
return
arcsin(x)
/
π,
in
the
interval
[−1/2,
+1/2].
7.12.4.10
The
atanpi
functions
Synopsis
[1]
#include
double atanpi(double x);
float atanpif(float x);
long double atanpil(long double x);
_FloatN atanpifN(_FloatN x);
_FloatNx atanpifNx(_FloatNx x);
_DecimalN atanpidN(_DecimalN x);
_DecimalNx atanpidNx(_DecimalNx x);
Description
[2]
The
atanpi
functions
compute
the
principal
value
of
the
arc
tangent
of
x,
divided
by
π,
thus
measuring
the
angle
in
half-‐revolutions.
A
range
error
occurs
if
the
magnitude
of
nonzero
x
is
too
small.
Returns
[3]
The
atanpi
functions
return
arctan(x)
/
π,
in
the
interval
[−1/2,
+1/2].
©
ISO/IEC
–
All
rights
reserved
ISO/IEC
TS
18661-‐4:2015(E)
7.12.4.11
The
atan2pi
functions
Synopsis
[1]
#include
double atan2pi(double y, double x);
float atan2pif(float y, float x);
long double atan2pil(long double y, long double x);
_FloatN atan2pifN(_FloatN y, _FloatN x);
_FloatNx atan2pifNx(_FloatNx y, _FloatNx x);
_DecimalN atan2pidN(_DecimalN y, _DecimalN x);
_DecimalNx atan2pidNx(_DecimalNx y, _DecimalNx x);
Description
[2]
The
atan2pi
functions
compute
the
angle,
measured
in
half-‐revolutions,
subtended
at
the
origin
by
the
point
(x,
y)
and
the
positive
x-‐axis.
Thus,
atan2pi
computes
arctan(y/x)
/
π,
in
the
range
[−1,
+1].
A
domain
error
may
occur
if
both
arguments
are
zero.
A
range
error
occurs
if
x
is
positive
and
the
magnitude
of
nonzero
y/x
is
too
small.
Returns
[3]
The
atan2pi
functions
return
the
computed
angle,
in
the
interval
[−1,
+1].
7.12.4.12
The
cospi
functions
Synopsis
[1]
#include
double cospi(double x);
float cospif(float x);
long double cospil(long double x);
_FloatN cospifN(_FloatN x);
_FloatNx cospifNx(_FloatNx x);
_DecimalN cospidN(_DecimalN x);
_DecimalNx cospidNx(_DecimalNx x);
Description
[2]
The
cospi
functions
compute
the
cosine
of
π
×
x,
thus
regarding
x
as
a
measurement
in
half-‐revolutions.
Returns
[3]
The
cospi
functions
return
cos(π
×
x).
©
ISO/IEC
–
All
rights
reserved
ISO/IEC
TS
18661-‐4:2015(E)
7.12.4.13
The
sinpi
functions
Synopsis
[1]
#include
double sinpi(double x);
float sinpif(float x);
long double sinpil(long double x);
_FloatN sinpifN(_FloatN x);
_FloatNx sinpifNx(_FloatNx x);
_DecimalN sinpidN(_DecimalN x);
_DecimalNx sinpidNx(_DecimalNx x);
Description
[2]
The
sinpi
functions
compute
the
sine
of
π
×
x,
thus
regarding
x
as
a
measurement
in
half-‐
revolutions.
Returns
[3]
The
sinpi
functions
return
sin(π
×
x).
7.12.4.14
The
tanpi
functions
Synopsis
[1]
#include
double tanpi(double x);
float tanpif(float x);
long double tanpil(long double x);
_FloatN tanpifN(_FloatN x);
_FloatNx tanpifNx(_FloatNx x);
_DecimalN tanpidN(_DecimalN x);
_DecimalNx tanpidNx(_DecimalNx x);
Description
[2]
The
tanpi
functions
compute
the
tangent
of
π
×
x,
thus
regarding
x
as
a
measurement
in
half-‐revolutions.
A
pole
error
may
occur
for
arguments
n
+
1/2,
for
integers
n.
Returns
[3]
The
tanpi
functions
return
tan(π
×
x).
In
7.12.6.9,
replace
the
subclause
title:
7.12.6.9
The
log1p
functions
©
ISO/IEC
–
All
rights
reserved
-------
...
기사 제목: ISO/IEC TS 18661-4:2015 - 정보기술-프로그래밍 언어, 그들의 환경 및 시스템 소프트웨어 인터페이스- C를위한 부동 소수점 확장 - 파트 4 : 보충 기능 기사 내용: ISO/IEC TS 18661-4:2015은 프로그래밍 언어 C를 확장하여 ISO/IEC/IEEE 60559:2011에서 지정하고 권장하는 기능을 포함합니다.
ISO/IEC TS 18661-4:2015 is a technical specification that expands the programming language C by incorporating additional functions that are defined and recommended in ISO/IEC/IEEE 60559:2011.
The article discusses ISO/IEC TS 18661-4:2015, which is a standard that extends the programming language C. This extension includes functions that are specified and recommended in the ISO/IEC/IEEE 60559:2011 standard.
기사 요약: ISO/IEC TS 18661-4:2015 - 정보 기술 - 프로그래밍 언어, 환경 및 시스템 소프트웨어 인터페이스 - C를 위한 부동 소수점 확장 - 제4부: 보조 함수 ISO/IEC TS 18661-4:2015는 ISO/IEC/IEEE 60559:2011에서 정의되고 권장되는 함수들을 포함하여 프로그래밍 언어 C를 확장합니다.
記事の要約:ISO/IEC TS 18661-4:2015 - 情報技術-プログラミング言語、環境、およびシステムソフトウェアインタフェース- Cのための浮動小数点拡張-パート4:補完関数 ISO/IEC TS 18661-4:2015は、ISO/IEC/IEEE 60559:2011で定義および推奨される関数を追加して、プログラミング言語Cを拡張します。
記事のタイトル:ISO/IEC TS 18661-4:2015 - 情報技術-プログラミング言語、環境、およびシステムソフトウェアインタフェース-Cのための浮動小数点拡張- 第4部:補足機能 記事の内容:ISO/IEC TS 18661-4:2015は、プログラミング言語Cを拡張し、ISO/IEC/IEEE 60559:2011で指定および推奨されている機能を含んでいます。








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...