Matlab/Octave 32-bit with 64-bit integers

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


Verify proper 64-bit representation in your Matlab / Octave install by:

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

64-bit integer issues on old Matlab/Octave: 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)