sort: use long doubles for general numeric mode
authorPádraig Brady <P@draigBrady.com>
Wed, 28 Apr 2010 22:54:33 +0000 (23:54 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 29 Apr 2010 17:55:57 +0000 (18:55 +0100)
commit8b5087d4e62439503e3cba774de225893b9ea81a
tree7ac7a407ac5368ca46082a807f17c16d009ded31
parent7905d6d34dbeb73ef03b3c75f66dde9036634775
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.
NEWS
doc/coreutils.texi
src/getlimits.c
src/sort.c
tests/Makefile.am
tests/misc/sort-float [new file with mode: 0755]
tests/test-lib.sh