フィルターのクリア

How to factorize 13916767508299776?

4 ビュー (過去 30 日間)
CHANDRABHAN Singh
CHANDRABHAN Singh 2020 年 6 月 13 日
コメント済み: madhan ravi 2020 年 6 月 13 日
Hi, I want to factorize 13916767508299776 into its prime factors. How can ew do that?
Thanks in advance.

採用された回答

Walter Roberson
Walter Roberson 2020 年 6 月 13 日
factor(uint64(13916767508299776))

その他の回答 (1 件)

madhan ravi
madhan ravi 2020 年 6 月 13 日
factor(sym(13916767508299776))
  2 件のコメント
Walter Roberson
Walter Roberson 2020 年 6 月 13 日
You should use
factor(sym('13916767508299776'))
because the argument to sym() is processed as a double before it is passed to sym, so when the value is greater than flintmax (2^53) then sym() will not necessarily receive the correct number to factor.
uint64() with a simple number as parameter is parsed as 64 bit by MATLAB; the number is not read in as double and then passed to uint64(). Not in new enough versions -- in sufficiently old releases, that did happen so it was necessary in some old enough releases to use other ways of constructing accurate uint64, such as
sscanf('13916767508299776', '%lu')
madhan ravi
madhan ravi 2020 年 6 月 13 日
Thank you sir Walter, very useful.

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

カテゴリ

Help Center および File ExchangeNumber Theory についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by