From 65672bf109a22748114bc3283aa499612c61a8c3 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 4 Sep 2012 18:26:25 +0200 Subject: factor: NEWS and tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * NEWS (Bug fixes): Mention it. * tests/misc/factor.pl: Add five of Torbjörn's tests. --- NEWS | 6 ++++++ tests/misc/factor.pl | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/NEWS b/NEWS index e90da13e0..f63df92a4 100644 --- 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)] diff --git a/tests/misc/factor.pl b/tests/misc/factor.pl index 47f934309..38a503714 100755 --- a/tests/misc/factor.pl +++ b/tests/misc/factor.pl @@ -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 -- cgit v1.2.3-70-g09d2