| 31 | namespace { // locals |
| 32 | |
| 33 | unsigned 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 |