Loading...
stdio/FreeBSD/printf.3 Libc-391.2.6 Libc-320
--- Libc/Libc-391.2.6/stdio/FreeBSD/printf.3
+++ Libc/Libc-320/stdio/FreeBSD/printf.3
@@ -34,9 +34,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)printf.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/stdio/printf.3,v 1.58 2004/10/16 16:00:01 stefanf Exp $
+.\" $FreeBSD: src/lib/libc/stdio/printf.3,v 1.55 2003/01/06 06:19:19 tjr Exp $
 .\"
-.Dd October 16, 2004
+.Dd January 4, 2003
 .Dt PRINTF 3
 .Os
 .Sh NAME
@@ -365,8 +365,6 @@
 conversion:
 .Bl -column ".Sy Modifier" ".Cm a , A , e , E , f , F , g , G"
 .It Sy Modifier Ta Cm a , A , e , E , f , F , g , G
-.It Cm l No (ell) Ta Vt double
-(ignored, same behavior as without it)
 .It Cm L Ta Vt "long double"
 .El
 .Pp
@@ -519,21 +517,30 @@
 .It Cm aA
 The
 .Vt double
-argument is rounded and converted to hexadecimal notation in the style
+argument is converted to hexadecimal notation in the style
 .Sm off
 .Oo \- Oc Li 0x Ar h Li \&. Ar hhhp Oo \\*[Pm] Oc Ar d ,
 .Sm on
 where the number of digits after the hexadecimal-point character
 is equal to the precision specification.
-If the precision is missing, it is taken as enough to represent
-the floating-point number exactly, and no rounding occurs.
-If the precision is zero, no hexadecimal-point character appears.
+If the precision is missing, it is taken as enough to exactly
+represent the floating-point number; if the precision is
+explicitly zero, no hexadecimal-point character appears.
+This is an exact conversion of the mantissa+exponent internal
+floating point representation; the
+.Sm off
+.Oo \- Oc Li 0x Ar h Li \&. Ar hhh
+.Sm on
+portion represents exactly the mantissa; only denormalized
+mantissas have a zero value to the left of the hexadecimal
+point.
 The
 .Cm p
 is a literal character
-.Ql p ,
-and the exponent consists of a positive or negative sign
-followed by a decimal number representing an exponent of 2.
+.Ql p ;
+the exponent is preceded by a positive or negative sign
+and is represented in decimal, using only enough characters
+to represent the exponent.
 The
 .Cm A
 conversion uses the prefix
@@ -549,21 +556,6 @@
 (rather than
 .Ql p )
 to separate the mantissa and exponent.
-.Pp
-Note that there may be multiple valid ways to represent floating-point
-numbers in this hexadecimal format.
-For example,
-.Li 0x3.24p+0 , 0x6.48p-1
-and
-.Li 0xc.9p-2
-are all equivalent.
-The format chosen depends on the internal representation of the
-number, but the implementation guarantees that the length of the
-mantissa will be minimized.
-Zeroes are always represented with a mantissa of 0 (preceded by a
-.Ql -
-if appropriate) and an exponent of
-.Li +0 .
 .It Cm C
 Treated as
 .Cm c
@@ -863,6 +855,26 @@
 .Pp
 The
 .Nm
+family of functions currently lack the ability to use the
+.Cm '
+flag in conjunction with the
+.Cm f
+conversion specifier.
+The
+.Cm a
+and
+.Cm A
+conversion specifiers have not yet been implemented.
+The
+.Cm L
+modifier for floating point formats simply round the
+.Vt "long double"
+argument to
+.Vt double ,
+providing no additional precision.
+.Pp
+The
+.Nm
 family of functions do not correctly handle multibyte characters in the
 .Fa format
 argument.