Subject: | not working as expected for this example |
consider the case where digits are 1..9,
$calc9 = new Math::BaseCalc(digits=>[1..9]);
this has nine digits, so should represent base9
this corresponds to the integer series as described here:
http://oeis.org/A052382
Using the example on that page:
$ perl -Mblib -MMath::BaseCalc -E 'my $calc = new Math::BaseCalc(digits => [0..8]); my $b = $calc->to_base(729); say $b'
1000
$ perl -Mblib -MMath::BaseCalc -E 'my $calc = new Math::BaseCalc(digits => [1..9]); my $b = $calc->to_base(729); say $b'
2111
this result is wrong, it should be 889.