Linux-man Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] printf.3: Add detail on the first digit with the %e format
@ 2019-08-20 13:35 Vincent Lefevre
  2019-09-13 12:38 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent Lefevre @ 2019-08-20 13:35 UTC (permalink / raw)
  To: mtk.manpages; +Cc: linux-man

This requirement on the first digit with the %e format comes from
the ISO C standard. It ensures that all the digits in the output are
significant and forbids output with a precision less than requested.

Signed-off-by: Vincent Lefevre <vincent@vinc17.net>
---
 man3/printf.3 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/man3/printf.3 b/man3/printf.3
index fb40b7077..66ad6af02 100644
--- a/man3/printf.3
+++ b/man3/printf.3
@@ -658,7 +658,8 @@ The
 .I double
 argument is rounded and converted in the style
 .RB [\-]d \&. ddd e \(+-dd
-where there is one digit before the decimal-point character and the number
+where there is one digit (which is nonzero if the argument is nonzero)
+before the decimal-point character 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 zero, no decimal-point character
 appears.
-- 
2.23.0.rc1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] printf.3: Add detail on the first digit with the %e format
  2019-08-20 13:35 [PATCH] printf.3: Add detail on the first digit with the %e format Vincent Lefevre
@ 2019-09-13 12:38 ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2019-09-13 12:38 UTC (permalink / raw)
  To: Vincent Lefevre; +Cc: mtk.manpages, linux-man

Hello Vincent,

On 8/20/19 3:35 PM, Vincent Lefevre wrote:
> This requirement on the first digit with the %e format comes from
> the ISO C standard. It ensures that all the digits in the output are
> significant and forbids output with a precision less than requested.

Thanks. Patch applied.

Cheers,

Michael

> Signed-off-by: Vincent Lefevre <vincent@vinc17.net>
> ---
>  man3/printf.3 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/man3/printf.3 b/man3/printf.3
> index fb40b7077..66ad6af02 100644
> --- a/man3/printf.3
> +++ b/man3/printf.3
> @@ -658,7 +658,8 @@ The
>  .I double
>  argument is rounded and converted in the style
>  .RB [\-]d \&. ddd e \(+-dd
> -where there is one digit before the decimal-point character and the number
> +where there is one digit (which is nonzero if the argument is nonzero)
> +before the decimal-point character 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 zero, no decimal-point character
>  appears.
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-20 13:35 [PATCH] printf.3: Add detail on the first digit with the %e format Vincent Lefevre
2019-09-13 12:38 ` Michael Kerrisk (man-pages)

Linux-man Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-man/0 linux-man/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-man linux-man/ https://lore.kernel.org/linux-man \
		linux-man@vger.kernel.org linux-man@archiver.kernel.org
	public-inbox-index linux-man


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-man


AGPL code for this site: git clone https://public-inbox.org/ public-inbox