(0000125)
msbrown (manager)
2009-06-26 15:49
edited on: 2009-10-09 16:33
|
Interpretation response
------------------------
The standard does not speak to this issue, and as such
no conformance distinction can be made between alternative
implementations based on this. This is being referred to the
sponsor.
Rationale:
-------------
None.
Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
This is a cross volume change
All page and line numbers are for draft 5.1.
Changes to XBD ...
At page 9 line 246 replace the description of the MX code with:
MX IEC 60559 Floating-Point
The functionality described is optional. The functionality
described is mandated by the ISO C standard only for
implementations that define __STDC_IEC_559__.
and add an MXX code after it:
MXX IEC 60559 Floating-Point Extension
The functionality described is part of the IEC 60559
Floating-Point option, but is an extension to the ISO C standard.
(The "part of" here is because the functionality provided by both
MX and MXX is available when __STDC_IEC_559__ is defined. Effectively
the two together form a single option.)
Note that the above changes include removal of the second paragraph of
the MX description:
Where applicable, functions are marked with the MX margin legend
in the SYNOPSIS section. Where additional semantics apply to a
function, the material is identified by use of the MX margin legend.
(This is because there are no functions whose SYNOPSIS has MX shading,
so there is no need to distinguish between MX markers in the SYNOPSIS
and those elsewhere.)
Changes to XSH ...
At P593 L20443 (asin), P595 L20501 (asinh), P599 L20603 (atan),
P605 L20752 (atanh), P790 L26409 (expm1), P1249 L41188 (log1p),
P1958 L62217 (sin), P1960 L62286 (sinh), P2074 L65711 (tan) and
P2076 L65793 (tanh) change:
[MX] If x is subnormal, a range error may occur and x should be
returned.[/MX]
to (substituting the appropriate function names for asin(), asinf()
and asinl()):
[MX] If x is subnormal, a range error may occur[/MX] [MXX] and x
should be returned.[/MXX]
[MX] If x is not returned, asin(), asinf(), and asinl() shall
return an implementation-defined value no greater in magnitude
than DBL_MIN, FLT_MIN, and LDBL_MIN, respectively.[/MX]
At P601 L20660 (atan2) change:
[MX] If the result underflows, a range error may occur and y/x
should be returned.[/MX]
to:
If the correct value would cause underflow, a range error may
occur, and atan2(), atan2f(), and atan2l() shall return an
implementation-defined value no greater in magnitude than DBL_MIN,
FLT_MIN, and LDBL_MIN, respectively. [MXX] If IEC 60559
Floating-Point is supported, y/x should be returned.[/MXX]
At P765 L25519 (erf) change:
[MX] If x is subnormal, a range error may occur, and 2 * x/sqrt(pi)
should be returned.[/MX]
to:
If the correct value would cause underflow, a range error may
occur, and erf(), erff(), and erfl() shall return an
implementation-defined value no greater in magnitude than
DBL_MIN, FLT_MIN, and LDBL_MIN, respectively. [MXX] If IEC
60559 Floating-Point is supported, 2 * x/sqrt(pi) should be
returned.[/MXX]
At P767 L25583 (erfc) change:
If the correct value would cause underflow and is not
representable, a range error may occur and [MX] either 0.0 (if
representable), or[/MX] an implementation-defined value shall be
returned.
to:
If the correct value would cause underflow, [MXX]and is not
representable[/MXX], a range error may occur, and erfc(), erfcf(),
and erfcl() shall return [MXX] 0.0, or [/MXX] (if IEC 60559
Floating-Point is not supported) an implementation-defined value
no greater in magnitude than DBL_MIN, FLT_MIN, and LDBL_MIN,
respectively.
At P767 L25589 (erfc) change MX shading to MXX for:
If the correct value would cause underflow and is representable,
a range error may occur and the correct value shall be returned.
At P786 L26270 (exp), P788 L26347 (exp2), P870 L28890 (fmod),
P1210 L39939 (ldexp), P1518 L49006 (pow) and P2074 L65707 (tan)
change:
If the correct value would cause underflow, and is not
representable, a range error may occur, and [MX] either 0.0
(if supported), or[/MX] an implementation-defined value shall be
returned.
to (substituting the appropriate function names for exp(), expf() and
expl()):
If the correct value would cause underflow, [MXX]and is not
representable[/MXX], a range error may occur, and exp(), expf(),
and expl() shall return [MXX] 0.0, or [/MXX] (if IEC 60559
Floating-Point is not supported) an implementation-defined value
no greater in magnitude than DBL_MIN, FLT_MIN, and LDBL_MIN,
respectively.
At P1795 L57424 (scalbln) change:
If the correct value would cause underflow, and is not
representable, a range error may occur, and [MX] either 0.0
(if supported), or[/MX] an implementation-defined value shall be
returned.
to:
If the correct value would cause underflow, [MXX]and is not
representable[/MXX], a range error may occur, and scalbln(),
scalblnf(), scalblnl(), scalbn(), scalbnf(), and scalbnl()
shall return [MXX] 0.0, or [/MXX] (if IEC 60559 Floating-Point
is not supported) an implementation-defined value no greater in
magnitude than DBL_MIN, FLT_MIN, LDBL_MIN, DBL_MIN, FLT_MIN, and
LDBL_MIN, respectively.
At P786 L26276 (exp), P788 L26353 (exp2), P870 L28899 (fmod),
P1210 L39943 (ldexp), P1519 L49029 (pow), P1795 L57429 (scalbln)
and P2074 L65714 (tan) change MX shading to MXX for:
If the correct value would cause underflow, and is representable,
a range error may occur and the correct value shall be returned.
At P818 L27345 (fdim) change:
If x-y is positive and underflows, a range error may occur, and
either (x-y) (if representable), [XSI] or 0.0 (if supported),[/XSI]
or an implementation-defined value shall be returned.
to:
If the correct value would cause underflow, a range error may
occur, and fdim(), fdimf(), and fdiml() shall return [MXX] the
correct value, or [/MXX] (if IEC 60559 Floating-Point is not
supported) an implementation-defined value no greater in magnitude
than DBL_MIN, FLT_MIN, and LDBL_MIN, respectively.
At P819 L27364 (fdim) delete from APPLICATION USAGE:
On implementations supporting IEEE Std 754-1985, x-y cannot
underflow, and hence the 0.0 return value is shaded as an
extension for implementations supporting the XSI option rather
than an MX extension.
At P1098 L36650 (hypot) change MX shading to MXX for:
If both arguments are subnormal and the correct result is subnormal,
a range error may occur and the correct result is returned.
and change "is returned" to "shall be returned".
At P1196 L39586 (j0) add MXX shading to:
If x is NaN, a NaN shall be returned.
At P1367 L44844 (nextafter) change:
[MX] If x!=y and the correct function value is subnormal, zero, or
underflows, a range error shall occur, and either the correct
function value (if representable) or 0.0 shall be returned.[/MX]
to:
[MX] If x!=y and the correct function value is subnormal, zero, or
underflows, a range error shall occur, and[/MX] [MXX] the correct
function value (if representable) or[/MXX] [MX] 0.0 shall be
returned.[/MX]
At P2105 L66604 (tgamma) add:
If the correct value would cause underflow, [MXX]and is not
representable[/MXX], a range error may occur, and tgamma(),
tgammaf(), and tgammal() shall return [MXX] 0.0, or [/MXX] (if
IEC 60559 Floating-Point is not supported) an implementation-
defined value no greater in magnitude than DBL_MIN, FLT_MIN,
and LDBL_MIN, respectively.
[MXX] If the correct value would cause underflow, and is
representable, a range error may occur and the correct value
shall be returned.[/MXX]
At P2106 L66636 (tgamma) add:
Range Error The result underflows.
If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
then errno shall be set to [ERANGE]. If the integer expression
(math_errhandling & MATH_ERREXCEPT) is non-zero, then the underflow
floating-point exception shall be raised.
At P2274 L71531 (y0) add MXX shading to:
If x is NaN, a NaN shall be returned.
(Target for TC1)
|