Skip Menu |

This queue is for tickets about the Math-Factor-XS CPAN distribution.

Report information
The Basics
Id: 53739
Status: resolved
Priority: 0/
Queue: Math-Factor-XS

People
Owner: Nobody in particular
Requestors: scheper [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 0.30
  • 0.31
  • 0.32
  • 0.33
  • 0.34
  • 0.35
  • 0.35_01
  • 0.35_02
  • 0.36
  • 0.36_01
  • 0.37
Fixed in: (no value)



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);
On Sat Jan 16 04:43:55 2010, Buck wrote: Show quoted text
> 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.
This happens because no factors are returned here first by factors(). The validation failure has been fixed in v0.37_02.
Resolved in v0.38.