In old MediaWiki versions, {{formatnum:}} was able to format integers of arbitrary size or floating-point numbers of arbitrary precision. For instance, on an ancient MediaWiki 1.18 install, we can test the formatting of
{{formatnum:9999999999999999}}
{{formatnum:3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938}}and see that the result is:
<p>9,999,999,999,999,999 </p><p>3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938 </p>
(The formatting of the floating-point number would be more interesting if it was formatted into a locale with different digits, but I don’t know a way to force that via a URL parameter – ?uselang doesn’t affect the page content language.)
On the other hand, on current MediaWiki in Wikimedia production, the result is instead:
<p>10,000,000,000,000,000 </p><p>3.1415926535897930000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 </p>
I believe this is a consequence of T167088 and therefore changed in MediaWiki 1.36, though I haven’t tested other MediaWiki versions.
A fix for this might eventually arrive in PHP request #76093, though attempts to implement it have not been successful so far.