I was trying to execute this program in Raku
but I got an error below:
How should I provide raku
with the perl
library there; what to copy where ?
use Math::BigInt;
$i = Math::BigInt->new($string);
use Math::BigInt ':constant';
print 10**121900;
Could not find
Math::BigInt
in
EDIT
I have failed to run zef
after installing it:
Failed to stat file: no such file or directory
EDIT
Failed to stat file: no such file or directory
Working with files and directories Raku can list the contents of a directory without resorting to shell commands (by using ls, for example). saydir; # List files and folders in the current directorysaydir"/Documents"; # List files and folders in the specified directory
Run the file by typing raku filename.rakuinto the terminal window and hitting [Enter]. Unlike the REPL, this will not automatically print the result of each line: the code must contain a statement like sayto print output. The REPL is mostly used for trying a specific piece of code, typically a single line.
The initial elements are 0 and 2 and the endpoint is 10. No generator was defined, but using the initial elements, Raku will deduce that the generator is (+2) This lazy list may return (if requested) the following elements (0, 2, 4, 6, 8, 10) Lazy list built using a defined generator my$lazylist= (0, { $_+ 3} ... 12); say$lazylist;
1.5. Editors Since most of the time we will be writing and storing our Raku programs in files, we should have a decent text editor that recognizes Raku syntax. Commais the Integrated Development Environment designed specifically for Raku. The community also uses frequently the following editors:
Math::BigInt
is a Perl module
Inline::Perl
needs to be installed in RakuMath::BigInt
needs to be installed in Perluse Inline::Perl5;
use Math::BigInt:from<Perl5>;
my $string = "121900";
my $i = Math::BigInt->new($string);
say 10**$i;
(Untested as I am away from my computer)
Of course that is rather pointless as Raku already supports large integers.
say 10**121900;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With