diff options
author | Torbjörn Granlund <tg@gmplib.org> | 2016-12-08 10:07:29 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2016-12-08 10:10:38 +0000 |
commit | ca52f3bf3f48a1a296e70bff5fd77ff789c570f5 (patch) | |
tree | 55811fbc475f8b7b2909c785395734eb46118e47 /tests/misc/factor.pl | |
parent | c44da115063bfea7ef8b2afd1c9d52737e2b7f70 (diff) | |
download | coreutils-ca52f3bf3f48a1a296e70bff5fd77ff789c570f5.tar.xz |
factor: retry properly if Pollard rho gives a trivial factorization
* src/factor.c (factor_using_pollard_rho): Handle trivial factor g = n.
(factor_using_pollard_rho2): Handle trivial factor g1 = n1, g0 = n0.
* tests/misc/factor.pl: Add a test case.
Fixes http://bugs.gnu.org/25135
Diffstat (limited to 'tests/misc/factor.pl')
-rwxr-xr-x | tests/misc/factor.pl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/misc/factor.pl b/tests/misc/factor.pl index e37df9d61..ec5413745 100755 --- a/tests/misc/factor.pl +++ b/tests/misc/factor.pl @@ -78,6 +78,8 @@ my @Tests = {OUT => '3401347 3861211 12099721'}], ['bug-2016-b', '222087527029934481871', {OUT => '15601 26449 111427 4830277'}], + ['bug-2016-c', '12847291069740315094892340035', + {OUT => '5 4073 18899 522591721 63874247821'}], ); # If we have GMP support, append tests to exercise it. |