MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / DiscreteLogWorkFactor

Function DiscreteLogWorkFactor

extra/yassl/taocrypt/src/dh.cpp:33–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31namespace { // locals
32
33unsigned int DiscreteLogWorkFactor(unsigned int n)
34{
35 // assuming discrete log takes about the same time as factoring
36 if (n<5)
37 return 0;
38 else
39 return (unsigned int)(2.4 * pow((double)n, 1.0/3.0) *
40 pow(log(double(n)), 2.0/3.0) - 5);
41}
42
43} // namespace locals
44

Callers 1

GeneratePrivateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected