<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content=
"HTML Tidy for OS/2 (vers 1 September 2005), see www.w3.org">
<style type="text/css">
del { font-weight:bold;background-color:#ffa0a0 }
ins { font-weight:bold;background-color:#a0ffa0 }
blockquote {
display: block;
font-family: "Times New Roman";
background-color:lightgray;
margin-top: 1em;
margin-bottom: 1em;
margin-left: 40px;
margin-right: 40px
}
</style>
<title>Ntttt: printf of NaN and Infinity</title>
</head>
<body>
<p><br>
<!-- Who are the authors... -->
<b>Submitter:</b>Fred Tydeman<br>
<!-- What is the date of submission. yyyy-mm-dd -->
<b>Submission Date:</b> 2018-10-??<br>
<b>Document:</b> WG14 Ntttt<br>
<b>Reference Documents:</b> <a href=
"http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2301.htm">N2301</a></p>
<p>Summary</p>
<p>There is no way for a user's application to control what is
output for a NaN or an infinity (the standard allows two forms
for each).</p>
<p>Technical Corrigendum:</p>
<p>Change §7.21.6.1#4, precision bullet from:</p>
<blockquote>
An optional precision that gives the minimum number of digits
to appear for the d, i, o, u, x, and X conversions, the number
of digits to appear after the decimal-point character for a, A,
e, E, f, and F conversions, the maximum number of significant
digits for the g and G conversions, or the maximum number of
bytes to be written for s conversions. The precision takes the
form of a period (.) followed either by an asterisk *
(described later) or by an optional nonnegative decimal
integer; if only the period is specified, the precision is
taken as zero. If a precision appears with any other conversion
specifier, the behavior is undefined.
</blockquote>
<p>to:</p>
<blockquote>
An optional precision that gives the minimum number of digits
to appear for the d, i, o, u, x, and X conversions, the number
of digits <ins>(for finite values)</ins> to appear after the
decimal-point character for a, A, e, E, f, and F conversions,
the maximum number of significant digits <ins>(for finite
values)</ins> for the g and G conversions, <ins>the number of
characters for NaN or infinity values for a, A, e, E, f, F, g,
and G conversions,</ins> or the maximum number of bytes to be
written for s conversions. The precision takes the form of a
period (.) followed either by an asterisk * (described later)
or by an optional nonnegative decimal integer; if only the
period is specified, the precision is taken as zero. If a
precision appears with any other conversion specifier, the
behavior is undefined.
</blockquote>
<p>Change in §7.21.6.1#8, f,F bullet from:</p>
<blockquote>
A double argument representing an infinity is converted in one
of the styles [-]inf or [-]infinity - which style is
implementation-defined. A double argument representing a NaN is
converted in one of the styles [-]nan or
[-]nan(n-char-sequence) - which style, and the meaning of any
n-char-sequence, is implementation-defined. The F conversion
specifier produces INF, INFINITY, or NAN instead of inf,
infinity, or nan, respectively.283)
</blockquote>
<p>to:</p>
<blockquote>
A double argument representing an infinity is converted <del>in
one of the styles</del> <ins>to</ins> [-]inf <ins>if the
precision is missing or less than four, otherwise to</ins>
<del>or</del>[-]infinity <del>- which style is
implementation-defined</del>. A double argument representing a
NaN is converted <del>in one of the styles</del> <ins>to</ins>
[-]nan <ins>if the precision is missing or less than four,
otherwise to</ins> <del>or</del>[-]nan(n-char-sequence) -
<del>which style, and</del> the meaning of any n-char-sequence
is implementation-defined. The F conversion specifier produces
INF, INFINITY, or NAN instead of inf, infinity, or nan,
respectively.283)
</blockquote>
<p>Change §7.29.2.1#4, precision bullet from:</p>
<blockquote>
An optional precision that gives the minimum number of digits
to appear for the d, i, o, u, x, and X conversions, the number
of digits to appear after the decimal-point wide character for
a, A, e, E, f, and F conversions, the maximum number of
significant digits for the g and G conversions, or the maximum
number of wide characters to be written for s conversions. The
precision takes the form of a period (.) followed either by an
asterisk * (described later) or by an optional nonnegative
decimal integer; if only the period is specified, the precision
is taken as zero. If a precision appears with any other
conversion specifier, the behavior is undefined.
</blockquote>
<p>to:</p>
<blockquote>
An optional precision that gives the minimum number of digits
to appear for the d, i, o, u, x, and X conversions, the number
of digits <ins>(for finite values)</ins> to appear after the
decimal-point wide character for a, A, e, E, f, and F
conversions, the maximum number of significant digits <ins>(for
finite values)</ins> for the g and G conversions, <ins>the
number of wide characters for NaN or infinity values for a, A,
e, E, f, F, g, and G conversions,</ins> or the maximum number
of wide characters to be written for s conversions. The
precision takes the form of a period (.) followed either by an
asterisk * (described later) or by an optional nonnegative
decimal integer; if only the period is specified, the precision
is taken as zero. If a precision appears with any other
conversion specifier, the behavior is undefined.
</blockquote>
<p>Change in §7.29.2.1#8, f,F bullet from:</p>
<blockquote>
A double argument representing an infinity is converted in one
of the styles [-]inf or [-]infinity - which style is
implementation-defined. A double argument representing a NaN is
converted in one of the styles [-]nan or
[-]nan(n-wchar-sequence) - which style, and the meaning of any
n-wchar-sequence, is implementation-defined. The F conversion
specifier produces INF, INFINITY, or NAN instead of inf,
infinity, or nan, respectively.338)
</blockquote>
<p>to:</p>
<blockquote>
A double argument representing an infinity is converted <del>in
one of the styles</del> <ins>to</ins> [-]inf <ins>if the
precision is missing or less than four, otherwise to</ins>
<del>or</del> [-]infinity <del>- which style is
implementation-defined</del>. A double argument representing a
NaN is converted <del>in one of the styles</del> <ins>to</ins>
[-]nan <ins>if the precision is missing or less than four,
otherwise to</ins> <del>or</del> [-]nan(n-wchar-sequence) -
<del>which style, and</del> the meaning of any n-wchar-sequence
is implementation-defined. The F conversion specifier produces
INF, INFINITY, or NAN instead of inf, infinity, or nan,
respectively.338)
</blockquote>
<p>Change §J.3.12</p>
<blockquote>
- The style used to print an infinity or NaN, and the meaning
of any n-char or n-wchar sequence printed for a NaN (7.21.6.1,
7.29.2.1).
</blockquote>
<p>to:</p>
<blockquote>
- The <del>style used to print an infinity or NaN, and
the</del> meaning of any n-char or n-wchar sequence printed for
a NaN (7.21.6.1, 7.29.2.1).
</blockquote>
</body>
</html>