Here is another utility for really large numbers: https://github.com/graemeg/freepascal/tree/master/packages/gmp GMP (multi precision) bindings for fpc This has been around for quite a while and should be well known - I either forgot about it, or memory faded, or it didn't register in my mind