Arbitrary-precision integers (included): Difference between revisions
Arbitrary-precision integers (included) (view source)
Revision as of 08:15, 7 October 2022
, 1 year ago→{{header|Common Lisp}}
Line 607:
<pre>
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>
|