Non-decimal radices/Convert: Difference between revisions
Content added Content deleted
m (now included as demo\rosetta\Convert_base.exw) |
m (→{{header|Perl}}: Add libheader) |
||
Line 2,315: | Line 2,315: | ||
print "$num\n"; # prints "26"</lang> |
print "$num\n"; # prints "26"</lang> |
||
The [https://metacpan.org/pod/ntheory ntheory] module includes functions that will perform base conversion, and is fast. It supports bases up to 36 and bigints. |
The [https://metacpan.org/pod/ntheory ntheory] module includes functions that will perform base conversion, and is fast. It supports bases up to 36 and bigints.{{libheader|ntheory}} |
||
<lang perl>use ntheory qw/fromdigits todigitstring/; |
<lang perl>use ntheory qw/fromdigits todigitstring/; |
||
my $n = 65261; |
my $n = 65261; |