diff options
author | das <das@FreeBSD.org> | 2005-03-21 08:01:09 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2005-03-21 08:01:09 +0000 |
commit | f5e55fd6043735ac328d3781c369fad18a4473a7 (patch) | |
tree | 587be6da68e9def7bd60577e5323789d902df796 /usr.bin/printf/printf.1 | |
parent | 79d24f2484be4474682749ca0ad8fcc097aea491 (diff) | |
download | FreeBSD-src-f5e55fd6043735ac328d3781c369fad18a4473a7.zip FreeBSD-src-f5e55fd6043735ac328d3781c369fad18a4473a7.tar.gz |
Support the L modifier for floating-point values as an extension.
When L is omitted, double precision is used, so printf(1) gives
reproducable results. When L is specified, long double precision is
used, which may improve precision, depending on the machine.
Diffstat (limited to 'usr.bin/printf/printf.1')
-rw-r--r-- | usr.bin/printf/printf.1 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/usr.bin/printf/printf.1 b/usr.bin/printf/printf.1 index 445c7aa..01360a4 100644 --- a/usr.bin/printf/printf.1 +++ b/usr.bin/printf/printf.1 @@ -197,6 +197,11 @@ A character which indicates the type of format to use (one of .Cm diouxXfFeEgGaAcsb ) . The uppercase formats differ from their lowercase counterparts only in that the output of the former is entirely in uppercase. +The floating-point format specifiers +.Cm ( fFeEgGaA ) +may be prefixed by an +.Cm L +to request that additional precision be used, if available. .El .Pp A field width or precision may be @@ -326,6 +331,11 @@ Since the floating point numbers are translated from .Tn ASCII to floating-point and then back again, floating-point precision may be lost. +(By default, the number is translated to an IEEE-754 double-precision +value before being printed. +The +.Cm L +modifier may produce additional precision, depending on the hardware platform.) .Pp .Tn ANSI hexadecimal character constants were deliberately not provided. |