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

Function powgr

test/int/arithmetic.cpp:285–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283 };
284
285 bool powgr(int n, long long int r, int x) {
286 assert(r >= 0);
287 long long int y = r;
288 long long int p = 1;
289 do {
290 p *= y; n--;
291 if (p > x)
292 return true;
293 } while (n > 0);
294 return false;
295 }
296
297 int fnroot(int n, int x) {
298 if (x < 2)

Callers 2

fnrootFunction · 0.85
fnrootMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected