Function Documentation/floor for a square root funciton

DUDE man dude_m at hotmail.com
Mon Mar 14 19:44:39 CET 2005


Hi all,

I had a quick question. I'm writing a quadratic sieve program for an 
encryption class. It's a rather large number, hopefully the team didn't pick 
their primes well (fingers crossed). Anyhow, I need to do a floor of the 
square root function. I was trying to figure out which mpz function to use 
for it. I was looking at the sqrt.c file and at the top it says 
mpz_sqrt(root, u) -- floor(sqrt(U)). So does that mean I'm supposed to call 
mpz_sqrt twice, ones for the first, the second time to get the floor, I'm 
sorry but the documentation I'm finding (which I hope I'm just dumb and not 
seeing it) seems fairly weak in the sense that it's not in-depth or existant 
in some cases.

Any help would be appreciated,
Evan




More information about the gmp-discuss mailing list