square roots mod p also mupad functionality

2 ビュー (過去 30 日間)
Hao Sun
Hao Sun 2019 年 11 月 5 日
コメント済み: Walter Roberson 2019 年 11 月 5 日
I've never used mupad before I think but whats with that? like whats the easiet way to take square roots mod p this https://www.mathworks.com/help/symbolic/mupad_ref/numlib-sqrtmodp.html
is no longer working and I can't start up mupad I'm not sure if I'm typing something wrong or if I just don't have that functionality in my license.
  1 件のコメント
John D'Errico
John D'Errico 2019 年 11 月 5 日
As I recall, Shanks-Tonelli does it.

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

回答 (1 件)

Walter Roberson
Walter Roberson 2019 年 11 月 5 日
evalin(symengine, 'numlib::sqrtmodp(132132,3231227)')
still works, as does using the command
mupad
to start a graphical interface to mupad and then entering
numlib::sqrtmodp(132132,3231227)
there.
  1 件のコメント
Walter Roberson
Walter Roberson 2019 年 11 月 5 日
feval(symengine, 'numlib::sqrtmodp', sym('132132'), sym('3231227'))
If our values fit within doubles, up to flintmax(), then you do not need the sym() with the quoted number:
feval(symengine, 'numlib::sqrtmodp', 132132, 3231227)

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

Community Treasure Hunt

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

Start Hunting!

Translated by