Arbitrary-precision integers (included): Difference between revisions

Content added Content deleted
Line 607: Line 607:
<pre>
<pre>
62060698786608744707...92256259918212890625, length 183231
62060698786608744707...92256259918212890625, length 183231
</pre>


=={{header|Crystal}}==
<syntaxhighlight lang="Crystal">require "big"

z = (BigInt.new(5) ** 4 ** 3 ** 2).to_s
zSize = z.size
puts "5**4**3**2 = #{z[0, 20]} .. #{z[zSize-20, 20]} and has #{zSize} digits"
</syntaxhighlight>
{{out}}
<pre>5**4**3**2 = 62060698786608744707 .. 92256259918212890625 and it has 183231 digits
</pre>
</pre>