Hi. I just encountered a strange issue in the factor() function for numbers that have many (small) prime factors.
Bellow is an example for a number that has 881 small prime factors (836 unique factors):
use 5.014;
use Math::Prime::Util::GMP qw(consecutive_integer_lcm factor);
my $n = consecutive_integer_lcm(6427); # works for 6426
say "Trying to factor $n";
say join(' ', factor($n));
Hi. I just encountered a strange issue in the
factor()
function for numbers that have many (small) prime factors.Bellow is an example for a number that has 881 small prime factors (836 unique factors):
Output:
The prime factors of this number are:
This issue also affects other functions that use
factor()
internally.