summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2010-04-28 23:54:33 +0100
committerPádraig Brady <P@draigBrady.com>2010-04-29 18:55:57 +0100
commit8b5087d4e62439503e3cba774de225893b9ea81a (patch)
tree7ac7a407ac5368ca46082a807f17c16d009ded31 /doc
parent7905d6d34dbeb73ef03b3c75f66dde9036634775 (diff)
downloadcoreutils-8b5087d4e62439503e3cba774de225893b9ea81a.tar.xz
sort: use long doubles for general numeric mode
* src/sort.c (general_numcompare): Use long doubles unconditionally, and strtold when available, to convert numbers with greater range and precision. Performance was seen to be on par with standard doubles. * doc/coreutils.texi (sort invocation): Amend the -g description to mention long double rather than double, and strtold rather than strtod. * src/getlimits.c (main): Output floating point limits for use in tests. * tests/misc/sort-float: A new test to ensure sort is using long doubles when possible, and that locale specific floats are handled. * tests/Makefile.am: Reference the new test. * tests/test-lib.sh (getlimits_): Normalize indenting. * NEWS: Mention the new behaviour. Reported by Nelson Beebe.
Diffstat (limited to 'doc')
-rw-r--r--doc/coreutils.texi4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 73971c6a6..c8ba53c78 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -3767,8 +3767,8 @@ the final result, after the throwing away.))
@opindex --sort
@cindex general numeric sort
@vindex LC_NUMERIC
-Sort numerically, using the standard C function @code{strtod} to convert
-a prefix of each line to a double-precision floating point number.
+Sort numerically, using the standard C function @code{strtold} to convert
+a prefix of each line to a long double-precision floating point number.
This allows floating point numbers to be specified in scientific notation,
like @code{1.0e-34} and @code{10e100}.
The @env{LC_NUMERIC} locale determines the decimal-point character.