Information Technology — Programming languages, their environments, and system software interfaces — Floating-point extensions for C — Part 3: Interchange and extended types

ISO/IEC TS 18661-3:2015 extends programming language C to include types with the arithmetic interchange and extended floating-­‐point formats specified in ISO/IEC/IEEE 60559:2011, and to include functions that support the non-­‐arithmetic interchange formats in that standard.

Technologies de l'information — Langages de programmation, leurs environnements et interfaces du logiciel système — Extensions à virgule flottante pour C — Partie 3: Types d'échange et étendus

General Information

Status
Published
Publication Date
05-Oct-2015
Current Stage
9093 - International Standard confirmed
Completion Date
03-Sep-2024
Ref Project

Buy Standard

Technical specification
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 Released:10/6/2015
English language
58 pages
sale 15% off
Preview
sale 15% off
Preview
Technical specification
ISO/IEC TS 18661-3:2015 - Information Technology -- Programming languages, their environments, and system software interfaces -- Floating-point extensions for C
English language
58 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)


TECHNICAL ISO/IEC TS
SPECIFICATION 18661-3
First edition
2015-10-01
Information Technology —
Programming languages, their
environments, and system software
interfaces — Floating-point
extensions for C —
Part 3:
Interchange and extended types
Technologies de l’information — Langages de programmation, leurs
environnements et interfaces du logiciel système — Extensions à
virgule flottante pour C —
Partie 3: Types d’échange et étendus
Reference number
©
ISO/IEC 2015
© ISO/IEC 2015, Published in Switzerland
�ll ri�ht� re�erved. �nle�� otherwi�e ��e�i�ied, no �art o� thi� ���li�ation �a� �e re�rod��ed or �tilized otherwi�e in an� �or�
or �� an� �ean�, ele�troni� or �e�hani�al, in�l�din� �hoto�o��in�, or �o�tin� on the internet or an intranet, witho�t �rior
written �er�i��ion. Per�i��ion �an �e re��e�ted �ro� either �S� at the addre�� �elow or �S��� �e��er �od� in the �o�ntr� o�
the requester.
�S� �o��ri�ht o��i�e
Ch. de Blandonnet 8 • CP 401
CH-1214 Vernier, Geneva, Switzerland
Tel. +41 22 749 01 11
Fax +41 22 749 09 47
�o��ri�ht�i�o.or�
www.iso.org
ii © ISO/IEC 2015 – All rights reserved

ISO/IEC
TS
18661-­‐3: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
..............................................................................................................................................
Types
........................................................................................................................................................................
Characteristics
....................................................................................................................................................
Conversions
..........................................................................................................................................................
Constants
...............................................................................................................................................................
Expressions
........................................................................................................................................................
Non-­‐arithmetic
interchange
formats
........................................................................................................
Mathematics

................................................................................................................................
12.1
Macros
..............................................................................................................................................................
12.2
Floating-­‐point
environment
.....................................................................................................................
12.3
Functions
.........................................................................................................................................................
12.4
Encoding
conversion
functions
...............................................................................................................
Numeric
conversion
functions
in

....................................................................................
Complex
arithmetic

...........................................................................................................
Type-­‐generic
macros

...........................................................................................................
Bibliography
................................................................................................................................................................
©
ISO/IEC

All
rights
reserved
iii
ISO/IEC
TS
18661-­‐3: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-­‐3:2015(E)
ISO/IEC
TS
18661-­‐3,
ISO/IEC
TS
18661-­‐4,
and
ISO/IEC
TS
18661-­‐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-­‐3: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-­‐3: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-­‐
...


TECHNICAL ISO/IEC TS
SPECIFICATION 18661-3
First edition
2015-10-01
Information Technology —
Programming languages, their
environments, and system software
interfaces — Floating-point
extensions for C —
Part 3:
Interchange and extended types
Technologies de l’information — Langages de programmation, leurs
environnements et interfaces du logiciel système — Extensions à
virgule flottante pour C —
Partie 3: Types d’échange et étendus
Reference number
©
ISO/IEC 2015
© ISO/IEC 2015, Published in Switzerland
�ll ri�ht� re�erved. �nle�� otherwi�e ��e�i�ied, no �art o� thi� ���li�ation �a� �e re�rod��ed or �tilized otherwi�e in an� �or�
or �� an� �ean�, ele�troni� or �e�hani�al, in�l�din� �hoto�o��in�, or �o�tin� on the internet or an intranet, witho�t �rior
written �er�i��ion. Per�i��ion �an �e re��e�ted �ro� either �S� at the addre�� �elow or �S��� �e��er �od� in the �o�ntr� o�
the requester.
�S� �o��ri�ht o��i�e
Ch. de Blandonnet 8 • CP 401
CH-1214 Vernier, Geneva, Switzerland
Tel. +41 22 749 01 11
Fax +41 22 749 09 47
�o��ri�ht�i�o.or�
www.iso.org
ii © ISO/IEC 2015 – All rights reserved

ISO/IEC
TS
18661-­‐3: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
..............................................................................................................................................
Types
........................................................................................................................................................................
Characteristics
....................................................................................................................................................
Conversions
..........................................................................................................................................................
Constants
...............................................................................................................................................................
Expressions
........................................................................................................................................................
Non-­‐arithmetic
interchange
formats
........................................................................................................
Mathematics

................................................................................................................................
12.1
Macros
..............................................................................................................................................................
12.2
Floating-­‐point
environment
.....................................................................................................................
12.3
Functions
.........................................................................................................................................................
12.4
Encoding
conversion
functions
...............................................................................................................
Numeric
conversion
functions
in

....................................................................................
Complex
arithmetic

...........................................................................................................
Type-­‐generic
macros

...........................................................................................................
Bibliography
................................................................................................................................................................
©
ISO/IEC

All
rights
reserved
iii
ISO/IEC
TS
18661-­‐3: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-­‐3:2015(E)
ISO/IEC
TS
18661-­‐3,
ISO/IEC
TS
18661-­‐4,
and
ISO/IEC
TS
18661-­‐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-­‐3: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-­‐3: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-­‐
...

Questions, Comments and Discussion

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