MCPcopy Create free account
hub / github.com/JeanLucPons/VanitySearch / HasSqrt

Method HasSqrt

IntMod.cpp:620–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618// ------------------------------------------------
619
620bool Int::HasSqrt() {
621
622 // Euler's criterion
623 Int e(&_P);
624 Int a(this);
625 e.SubOne();
626 e.ShiftR(1);
627 a.ModExp(&e);
628
629 return a.IsOne();
630
631}
632
633// ------------------------------------------------
634

Callers 2

CheckMethod · 0.80
ModSqrtMethod · 0.80

Calls 4

SubOneMethod · 0.80
ShiftRMethod · 0.80
ModExpMethod · 0.80
IsOneMethod · 0.80

Tested by

no test coverage detected