diff --git a/stepmania/src/crypto51/nbtheory.cpp b/stepmania/src/crypto51/nbtheory.cpp index 8f7f694c1e..9eb0e1da46 100644 --- a/stepmania/src/crypto51/nbtheory.cpp +++ b/stepmania/src/crypto51/nbtheory.cpp @@ -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); }