If you tell gcc to consider floating point constants as single precision (since that's most of what's used in SM), it warns here. This just shuts it up.

This commit is contained in:
Steve Checkoway
2005-10-29 13:04:07 +00:00
parent 4ce7d47899
commit ad6191e6d9
+2 -2
View File
@@ -719,14 +719,14 @@ unsigned int FactoringWorkFactor(unsigned int n)
// extrapolated from the table in Odlyzko's "The Future of Integer Factorization"
// updated to reflect the factoring of RSA-130
if (n<5) return 0;
else return (unsigned int)(2.4 * pow((double)n, 1.0/3.0) * pow(log(double(n)), 2.0/3.0) - 5);
else return (unsigned int)(2.4 * pow((double)n, double(1.0)/3.0) * pow(log(double(n)), double(2.0)/3.0) - 5);
}
unsigned int DiscreteLogWorkFactor(unsigned int n)
{
// assuming discrete log takes about the same time as factoring
if (n<5) return 0;
else return (unsigned int)(2.4 * pow((double)n, 1.0/3.0) * pow(log(double(n)), 2.0/3.0) - 5);
else return (unsigned int)(2.4 * pow((double)n, double(1.0)/3.0) * pow(log(double(n)), double(2.0)/3.0) - 5);
}