fwprintf.3c (2010 09)
f
fwprintf(3C) fwprintf(3C)
present, no radix character appears. If a radix character appears, at least one digit
appears before it. The value is rounded to the appropriate number of digits. The
F
conversion specifier produces "INF", "INFINITY", or "NAN" instead of "inf", "infinity", or
"nan", respectively. The
fwprintf() family of functions may make available wide-
character string representations for infinity and NaN.
e,E The double argument is converted in the style [-]d.ddde_dd , where there is one digit
before the radix character (which is non-zero if the argument is non-zero) and the
number of digits after it is equal to the precision; if the precision is missing, it is taken as
6; if the precision is 0 and no
# flag is present, no radix character appears. The value is
rounded to the appropriate number of digits. The
E conversion wide-character will pro-
duce a number with
E instead of e
introducing the exponent. The exponent always con-
tains at least two digits. If the value is 0, the exponent is 0. The fwprintf() family of
functions may make available wide-character string representations for infinity and
NaN.
g,G The double argument is converted in the style
f,F or e (or in the style E in the case of a
G
conversion wide-character), with the precision specifying the number of significant digits.
If an explicit precision is 0, it is taken as 1. The style used depends on the value con-
verted; style
e (or E) will be used only if the exponent resulting from such a conversion is
less than -4 or greater than or equal to the precision. Trailing zeros are removed from
the fractional portion of the result; a radix character appears only if it is followed by a
digit. The fwprintf() family of functions may make available wide-character string
representations for infinity and NaN.
a,A For Itanium-based systems only. The double arg is converted in the style
[
-]0xhrhhhp±d, where r is the radix character. There is one digit before the radix char-
acter and the number of digits after it is equal to the precision. When the precision is
missing, 13 digits are produced for double, 15 for extended, and 28 for long dou-
ble, which is sufficient for an exact representation of the value. If the precision is 0, no
radix character appears. The letters abcdef are used for a conversion and the letters
ABCDEF for A conversion. The A conversion specifier produces a number with X and
P
instead of x and p. The exponent always contains at least one digit, and only as many
more digits as necessary to represent the decimal exponent of 2. If the value is zero, the
exponent is zero.
For Itanium(R)-based systems if the optional decimal floating point feature is installed
and enabled, then for an
a or A specifier, if an H, D
,orDD modifier is present and the
precision is missing, then for a decimal floating type argument represented with an
integral coefficient c and quantum exponent q, where n is the number of digits in the
coefficient c:
• If 0 >= q >= -(n+5), use style
f formatting with formatting precision equal to -q.
• Otherwise, use style
e formatting with formatting precision equal to n - 1. Except if
c = 0, then the digit-sequence in the exponent-part will have the value q (rather
than 0). That the exponent is always expressed with the minimum number of digits
required to represent its value (the exponent never contains a leading zero).
If the precision modifier is present and at least as large as the precision of the decimal
floating type, the conversion is as if the precision modifier were missing.
If the precision modifier is present and less than the precision of the decimal floating
type, the conversion first rounds the input, in the type, according to the current rounding
direction for decimal floating-point operations. The rounding occurs to the number of
digits specified by the precision modifier, then converts the result as if the precision
modifier were missing.
c If no l qualifier is present, the int argument is converted to a wide-character as if by cal-
ling the btowc() function and the resulting wide-character is written. Otherwise the
wint_t argument is converted to wchar_t, and written.
s If no l qualifier is present, the argument must be a pointer to a character array contain-
ing a character sequence beginning in the initial shift state. Characters from the array
are converted as if by repeated calls to the mbrtowc() function, with the conversion
state described by an mbstate_t object initialized to zero before the first character is con-
verted, and written up to (but not including) the terminating null wide-character. If the
4 Hewlett-Packard Company − 4 − HP-UX 11i Version 3: September 2010