Arbitrary-precision integers (included): Difference between revisions

Line 1,093:
>>> console.log(`5**4**3**2 = ${y.slice(0,20)}...${y.slice(-20)} and has ${y.length} digits`);
5**4**3**2 = 62060698786608744707...92256259918212890625 and has 183231 digits</lang>
 
=={{header|jq}}==
'''Works with gojq, the Go implementation of jq'''
 
There is a BigInt.jq library for jq, but gojq, the Go implementation of jq, supports unbounded-precision integer arithmetic, so the output shown below is that produced by gojq.
<lang jq>
def power($b): . as $in | reduce range(0;$b) as $i (1; . * $in);
5|power(4|power(3|power(2))) | tostring
| .[:20], .[-20:], length
/lang>
{{out}}
<pre>
62060698786608744707
92256259918212890625
183231
</pre>
 
=={{header|Julia}}==
2,478

edits