Jump to content

Bell numbers: Difference between revisions

→‎{{header|jq}}: Using the C-based implementation of jq
(fix jq header)
(→‎{{header|jq}}: Using the C-based implementation of jq)
Line 1,547:
range(1;51) | bell</lang>
{{out}}
For displaying the results, we will first use gojq, the Go implementation of jq, as it supports unbounded-precision integer arithmetic.
<pre>1
2
Line 1,557:
10726137154573358400342215518590002633917247281
185724268771078270438257767181908917499221852770
</pre>
 
Using the C-based implementation of jq, the results become inexact from bell(23) onwards:
<pre>[1,1]
[2,2]
...
[21,474869816156751]
[22,4506715738447323]
# inexact
[23,44152005855084344]
[24,445958869294805300]
...
[49,1.0726137154573358e+46]
[50,1.8572426877107823e+47]
</pre>
 
2,471

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.