Subject: | Wrong factors for 2**n? |
Date: | Sat, 31 Oct 2009 14:07:03 +0100 |
To: | bug-Math-Factor-XS [...] rt.cpan.org |
From: | Thor Andreassen <ta [...] imada.sdu.dk> |
It seems that (at least in my environment) I get the wrong factors.
Example programs:
8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------
$ perl -le '
use Math::Factor::XS qw(factors);
$, = " ";
print factors(16);
'
2 4 4 8
8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------
or
8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------
$ perl -le '
use Math::Factor::XS qw(factors);
$, = " ";
print factors(4);
'
2 2
8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------
Operating environment below:
Module version:
Version 0.36 installed with CPAN.pm
Perl version:
8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------
$ perl -v
This is perl, v5.10.1 (*) built for i486-linux-gnu-thread-multi
Copyright 1987-2009, Larry Wall
Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to
the Internet, point your browser at http://www.perl.org/, the Perl Home
Page.
8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------
Operating system:
8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------
$ cat /etc/debian_version
Debian Squeeze
8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------
--
best regards
Thor Andreassen