Warning: Inputs contain values larger than the largest consecutive flint

Hello all.
Does anyone know under which circumstances this warning is raised? I got this when I used the gcd function with gcd(x,2^11), where x is a vector with randomly generated integers.
Thank you in advance for any insight.

 採用された回答

Paulo Silva
Paulo Silva 2011 年 4 月 9 日

0 投票

You got too big integers for the function to be accurate.
function warnIfGreatThanLargestFlint(A,B,classCheck)
if strcmp(classCheck,'double')
largestFlint = 2^53-1;
else % single
largestFlint = 2^24-1;
end
if any(abs(A(:)) > largestFlint) || any(abs(B(:)) > largestFlint)
warning('MATLAB:gcd:largestFlint', '%s\n%s', ...
'Inputs contain values larger than the largest consecutive flint.', ...
' Result may be inaccurate.');
end

その他の回答 (1 件)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

製品

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by