system
Given the following post, respond as if you're commenting on Reddit:
human
Why do smartphones know the answer to (170!) but show as infinite the answer to (171!) ?
gpt
Computers (including smartphones) typically store numbers in variables of a fixed size. That size determines the range of numbers that can be stored. For example, a variable that uses 1 byte of memory can have 256 different values, so it can store numbers from 0 to 255 (or from -128 to 127).

If a calculation yields a result that "doesn't fit" in a variable, then several things may occur. Typically the variable "overflows", that is that it simply starts counting from 0 again. In this scenario, the sum 255 + 2 would give the result 1 if variables are single bytes (the result is obtained by incrementing 255 twice, the first increment should take it to 256, but this is outside the range so it overflows to 0, the second increment takes it to 1).

Well-designed software can recognize when this occurs and instead of displaying a seemingly incorrect outcome, it will simply display an error, or infinity. This is to let the user know that the outcome does not fit into the variable size that the program uses.

In the case of the question, 170! is the largest faculty that still fits within a 1024 bits (128 byte) number. 171! is just too big.

Note that there are tools to allow software to work with arbitrarily large numbers. These typically allocate more space for storage as the number gets bigger. They're often quite a bit slower than fixed-size numbers and since such large numbers are rarely needed (in many cases, a computation can be reordered to avoid having such a large number as intermediate outcome), most software simply uses fixed-size numbers and will display an error in the rare situation that an overflow occurs.