フィルターのクリア

how can i write square root of mod x1(t)

5 ビュー (過去 30 日間)
Sunil Ojwani
Sunil Ojwani 2018 年 10 月 22 日
回答済み: John D'Errico 2018 年 10 月 22 日
sqrt(x(1)*t)

回答 (1 件)

John D'Errico
John D'Errico 2018 年 10 月 22 日
Huh? It looks like you already know how to write sqrt(x(1)*t). So what is your question?
Are you looking to find a modular square root? Something else? For example, if you are working in the integers modulo n, the square root of a number x is defined as the number y such that
mod(y*y,n) = mod(x,n)
You can find modroot in my VPI toolbox. Or, you can write the code for the Shanks-Tonelli algorithm.
modroot(vpi(13437),100003)
ans =
643
mod(643^2,100003)
ans =
13437
Or, are you looking for something completely different?

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by