Skip to contentSkip to conversation

printf.3: Fix description of %a hexfloat output

PATCH In review Jonathan Wakely 2 participants 2 messages Aug 7, 2020 – Aug 23, 2020 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 printf.3: Fix description of %a hexfloat output

The description of hexadecimal floating-point output is missing a character describing the exponent. The guarantee of at least one digit in the exponent is present in both C99 and POSIX.

man3/printf.3 +3 -1
index 18000bc70..d3510f7df 100644
@@ -730,7 +730,7 @@ conversion, the
 .I double
 argument is converted to hexadecimal notation (using the letters abcdef)
 in the style
-.RB [\-] 0x h \&. hhhh p \(+-;
+.RB [\-] 0x h \&. hhhh p \(+-d;
 for
 .B A
 conversion the prefix
@@ -746,6 +746,8 @@ and otherwise is sufficiently large to distinguish values of type
 .IR double .
 The digit before the decimal point is unspecified for nonnormalized
 numbers, and nonzero but otherwise unspecified for normalized numbers.
+The exponent always contains at least one
+digit; if the value is zero, the exponent is 0.
 .TP
 .B c
 If no
#1 lore raw

Hi Jonathan!

Quoted 3 lines · Jonathan Wakely

The description of hexadecimal floating-point output is missing a character describing the exponent. The guarantee of at least one digit in the exponent is present in both C99 and POSIX.

Thanks. Patch applied.

Cheers,

Michael

Quoted 23 lines
man3/printf.3 +3 -1
index 18000bc70..d3510f7df 100644
@@ -730,7 +730,7 @@ conversion, the
  .I double
  argument is converted to hexadecimal notation (using the letters abcdef)
  in the style
-.RB [\-] 0x h \&. hhhh p \(+-;
+.RB [\-] 0x h \&. hhhh p \(+-d;
  for
  .B A
  conversion the prefix
@@ -746,6 +746,8 @@ and otherwise is sufficiently large to distinguish values of type
  .IR double .
  The digit before the decimal point is unspecified for nonnormalized
  numbers, and nonzero but otherwise unspecified for normalized numbers.
+The exponent always contains at least one
+digit; if the value is zero, the exponent is 0.
  .TP
  .B c
  If no