Arbitrary-precision integers (included)

Author: Salve J. Nilsen

Using the in-built capabilities of your language, calculate the integer value of:


Confirm that the first and last twenty digits of the answer are: 62060698786608744707...92256259918212890625

Find and show the number of decimal digits in the answer.


What's interesting here?

  • metaoperator

  • casting

  • {} in string

Source code:

use v6;

my $x = ~[**] 5, 4, 3, 2;
say "5**4**3**2 = {substr($x,0,20)}...{substr($x,$x.chars-20)} and has {$x.chars} digits";