If below expression return ( p - 1 ) then modular square root is not possible
if ( pow1 ( $ n , ( $ p - 1 ) / 2 , $ p ) == ( $ p - 1 ) ) { printf ( " no ▁ sqrt ▁ possible STRNEWLINE " ) ; return -1 ; }