]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
factor: NEWS and tests
authorJim Meyering <meyering@redhat.com>
Tue, 4 Sep 2012 16:26:25 +0000 (18:26 +0200)
committerJim Meyering <meyering@redhat.com>
Fri, 7 Sep 2012 09:04:41 +0000 (11:04 +0200)
* NEWS (Bug fixes): Mention it.
* tests/misc/factor.pl: Add five of Torbjörn's tests.

NEWS
tests/misc/factor.pl

diff --git a/NEWS b/NEWS
index e90da13e017cec6f1cbffeb3e95e3d0f281fe096..f63df92a49aa798523704f5989e3a5450503bec3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,12 @@ GNU coreutils NEWS                                    -*- outline -*-
   it detects this precise type of cycle, diagnoses it as such and
   eventually exits nonzero.
 
+  factor (when using gmp) would mistakenly declare some composite numbers
+  to be prime, e.g., 465658903, 2242724851, 6635692801 and many more.
+  The fix makes factor somewhat slower (~25%) for ranges of consecutive
+  numbers, and up to 8 times slower for some worst-case individual numbers.
+  [bug introduced in coreutils-7.0, with GNU MP support]
+
   rm -i -d now prompts the user then removes an empty directory, rather
   than ignoring the -d option and failing with an 'Is a directory' error.
   [bug introduced in coreutils-8.19, with the addition of --dir (-d)]
index 47f9343096a80f45b9a5f2aa22997a4dc272d8b2..38a503714825bec83a3ebff54704f7839ed933af 100755 (executable)
@@ -67,6 +67,11 @@ my @Tests =
       {OUT => "4: 2 2\n"},
       {ERR => "$prog: 'a' is not a valid positive integer\n"},
       {EXIT => 1}],
+     ['bug-2012-a', '465658903', {OUT => '15259 30517'}],
+     ['bug-2012-b', '2242724851', {OUT => '33487 66973'}],
+     ['bug-2012-c', '6635692801', {OUT => '57601 115201'}],
+     ['bug-2012-d', '17709149503', {OUT => '94099 188197'}],
+     ['bug-2012-e', '17754345703', {OUT => '94219 188437'}],
     );
 
 # Prepend the command line argument and append a newline to end