MCPcopy Create free account
hub / github.com/Gecode/gecode / powle

Function powle

test/int/arithmetic.cpp:312–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310 }
311
312 bool powle(int n, long long int r, int x) {
313 assert(r >= 0);
314 long long int y = r;
315 long long int p = 1;
316 do {
317 p *= y; n--;
318 if (p >= x)
319 return false;
320 } while (n > 0);
321 assert(y < x);
322 return true;
323 }
324
325 int cnroot(int n, int x) {
326 if (x < 2)

Callers 2

cnrootFunction · 0.85
cnrootMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected