Re: [PATCH 1/2] printf(3): improve terminology in %a description

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 15, 2024 at 12:23:05AM GMT, Ken Pizzini wrote:
> The term "decimal point" does not technically apply when using bases
> other than 10; the more generic term is "radix point".  Update the
> description of the a/A conversion specifier (i.e., for hexadecimal
> floating point output) in printf(3) to use this terminology.
> 
> I do note that POSIX.1-2024 [1] does use the term "decimal-point
> character" here, but I still maintain that using "radix point" is a
> better term for that object in the %a description.  (Confusingly, POSIX
> does refer to "radix character" in the descriptions of %f and %e, where
> reference to "decimal" instead of "radix" would actually make sense.)
> 
> [1] <https://pubs.opengroup.org/onlinepubs/9799919799/functions/printf.html>
> 
> Signed-off-by: Ken Pizzini <ken@xxxxxxx>

Hi Ken,

I've applied this patch.  Thanks!

<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=fa80aedf4aed0b92ba3b329f0a003922eb960337>

Have a lovely day!
Alex

> ---
>  man/man3/printf.3 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/man/man3/printf.3 b/man/man3/printf.3
> index 3bc731f6e..7a96ec9c7 100644
> --- a/man/man3/printf.3
> +++ b/man/man3/printf.3
> @@ -759,13 +759,13 @@ .SS Conversion specifiers
>  the letters ABCDEF, and the exponent separator
>  .B P
>  is used.
> -There is one hexadecimal digit before the decimal point,
> +There is one hexadecimal digit before the radix point,
>  and the number of digits after it is equal to the precision.
>  The default precision suffices for an exact representation of the value
>  if an exact representation in base 2 exists
>  and otherwise is sufficiently large to distinguish values of type
>  .IR double .
> -The digit before the decimal point is unspecified for nonnormalized
> +The digit before the radix 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.
> -- 
> 2.47.0
> 

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux