MATLAB: How to avoid the loss of the last digit (it gives a zero instead of a one)

format

>> test2 = num2str(14472334024676221,'%0.0f')
test2 =
'14472334024676220'

Best Answer

num2str(uint64(14472334024676221),'%u')
You have exceeded flintmax:
flintmax Largest consecutive integer in floating point format.
flintmax returns the largest consecutive integer in IEEE double
precision, which is 2^53. Above this value, double precision format
does not have integer precision, and not all integers can be represented
exactly.
Related Question