in reply to Re: String adding
in thread String adding
bignum isn't needed. The example only requires 11 bits, for example.
Perl uses doubles which have 52 bits of precision. The above algorithms can safely handle strings
(((2^52)-1)/((2^8)-1))*2 = 17,661,175,009,296 chararacters long.
Using just ints on a 32 bit system, the above algorithms can safely handle strings
(((2^32)-1)/((2^8)-1))*2 = 16,843,008 chararacters long.
|
|---|