20 factorial - 19 digits. 100 factorial is 158 digits, occupying 500 bits! This is actually:
933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000 00000000
None of the standard types will work for you here, you will need to implement your own procedure for processing such large numbers.
For example, you will need to accept that multiplying two 32-bit values ββtogether can produce a 64-bit result.
It was a collaborative practice to calculate large numbers on days of 8-bit processors. It is called arbitrary precision arithmetic.
Here is a link to describe how this was done. Admittedly, this is for assembler, but it still persists. You will need to consider the default int sizes on your system.
Chrisbd
source share