Arbitrary-precision integers (included): Difference between revisions
Arbitrary-precision integers (included) (view source)
Revision as of 16:50, 26 June 2023
, 1 year ago→{{header|Raku}}: print number of digits
(→{{header|Raku}}: no need to quote numbers) |
(→{{header|Raku}}: print number of digits) |
||
Line 1,966:
{{works with|Rakudo|2022.07}}
<syntaxhighlight lang="raku" line>
given [**] 5, 4, 3, 2 {
ok ~([**] 5, 4, 3, 2) ~~ /^ 62060698786608744707 <digit>* 92256259918212890625 $/,▼
use Test;
'5**4**3**2 has expected first and last twenty digits';</syntaxhighlight>▼
printf 'This number has %d digits', .chars;
}</syntaxhighlight>
{{out}}
<pre>ok 1 - 5**4**3**2 has expected first and last twenty digits
This number has 183231 digits</pre>
=={{header|REXX}}==
|