Matlab/Octave 32-bit with 64-bit integers

Note: This doesn’t seem to be a problem in current versions of Matlab and Octave.

You can verify by:

assert(int2str(2^63)==sprintf('%ld',2^63))

int2str() may not work correctly on very old versions of 32-bit Matlab/Octave when using 64-bit integers on all platforms.

If you have this problem, to ensure your 64-bit integer converts to string correctly, use:

sprintf('%ld',myInt)

in place of:

int2str(myInt)

but again, on current versions of Matlab/Octave, this does not appear to be an issue anymore.