MATLAB: Intmax in 64 bits

64bitsintmax

Hi all, Why the answer is not 9223372036854775807 ?
< M A T L A B (R) >
Copyright 1984-2016 The MathWorks, Inc.
R2016a (9.0.0.341360) 64-bit (glnxa64)
February 11, 2016
To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.
Academic License
>> intmax
ans =
2147483647

Best Answer

Because, as clearly written in the documentation, intmax with no arguments is the same as
intmax('int32')
If you want 9223372036854775807, then you need to write
intmax('int64')