Arbitrary-precision integers (included): Difference between revisions

Content added Content deleted
(→‎{{header|Raku}}: use regex)
Tag: Made through Tor
Line 1,932: Line 1,932:
=={{header|Raku}}==
=={{header|Raku}}==
(formerly Perl 6)
(formerly Perl 6)
{{works with|Rakudo|2015.12}}
{{works with|Rakudo|2022.07}}


<syntaxhighlight lang="raku" line>given ~[**] 5, 4, 3, 2 {
<syntaxhighlight lang="raku" line>use Test;
ok ~([**] 5, 4, 3, 2) ~~ /^ '62060698786608744707' <digit>* '92256259918212890625' $/,
say "5**4**3**2 = {.substr: 0,20}...{.substr: *-20} and has {.chars} digits";
}</syntaxhighlight>
'5**4**3**2 has expected first and last twenty digits';</syntaxhighlight>
{{out}}
{{out}}
<pre>5**4**3**2 = 62060698786608744707...92256259918212890625 and has 183231 digits</pre>
<pre>ok 1 - 5**4**3**2 has expected first and last twenty digits</pre>


=={{header|REXX}}==
=={{header|REXX}}==