UIDGenerator: better support for 32-bit machines
authorTim Starling <tstarling@wikimedia.org>
Thu, 18 Apr 2013 22:34:20 +0000 (08:34 +1000)
committerTim Starling <tstarling@wikimedia.org>
Thu, 18 Apr 2013 22:34:20 +0000 (08:34 +1000)
commit241ec55610d909cca69d7d18a979238edc1ccf89
tree40c9ca5bcbbcc302c36cfbc235ce347b35b77c20
parent1525501d8427faaa6ed949459ce47dee2690889f
UIDGenerator: better support for 32-bit machines

Replace one exception with another that is less likely. Integer
multiplication is exact up to the limit of the double precision
mantissa size, and wfBaseConvert() will work up to any size of string.
So it's not necessary to require bcmath/gmp to be installed. The modulo
operation is equivalent to truncation of the binary form.

Perhaps mantissa sizes will be extended before the year 144680, made
possible by improved computing hardware. The exception message should be
altered when such hardware becomes available.

Change-Id: I8116dac1958b5dbef977d3900973bf13be3d9d17
includes/UIDGenerator.php