Arbitrary-precision integers (included): Difference between revisions

(→‎{{header|Raku}}: use regex)
Tag: Made through Tor
Line 1,932:
=={{header|Raku}}==
(formerly Perl 6)
{{works with|Rakudo|20152022.1207}}
 
<syntaxhighlight lang="raku" line>givenuse ~[**] 5, 4, 3, 2 {Test;
ok ~([**] 5, 4, 3, 2) ~~ /^ '62060698786608744707' <digit>* '92256259918212890625' $/,
say "5**4**3**2 = {.substr: 0,20}...{.substr: *-20} and has {.chars} digits";
} '5**4**3**2 has expected first and last twenty digits';</syntaxhighlight>
{{out}}
<pre>ok 1 - 5**4**3**2 =has 62060698786608744707...92256259918212890625expected first and haslast 183231twenty digits</pre>
 
=={{header|REXX}}==
1,934

edits