フィルターのクリア

intmax in 64 bits

1 回表示 (過去 30 日間)
Sergio Zlotnik
Sergio Zlotnik 2017 年 6 月 30 日
コメント済み: Steven Lord 2017 年 6 月 30 日
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
  2 件のコメント
Stephen23
Stephen23 2017 年 6 月 30 日
The intmax help states " intmax('int32') is the same as intmax with no arguments."
Steven Lord
Steven Lord 2017 年 6 月 30 日
I understand why you're confused. Whether MATLAB is a 32-bit or a 64-bit application does not change what intmax returns. You can ask for intmax of any of the eight integer types regardless of whether you're running a 32-bit version of MATLAB or a 64-bit version of MATLAB. As Stephen and Guillaume have said, intmax is equivalent to intmax('int32').

サインインしてコメントする。

採用された回答

Guillaume
Guillaume 2017 年 6 月 30 日
編集済み: Guillaume 2017 年 6 月 30 日
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')

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by