Subject: | Bug with Math-Factor-XS-0.37 and prime numbers |
When attempting to get the factors of a prime number, the module dies
with the following error:
Parameter #2 ("ARRAY(0x8198098)") to Math::Factor::XS::matches did not
pass the 'factors are positive numbers' callback
The expected behaviour would be getting the only factor, the number
itself, returned.
Example code:
use strict;
use warnings;
use Math::Factor::XS ':all';
my $n = 5;
my @factors = factors( $n);
my @matches = matches( $n, \@factors);