MCPcopy Create free account
hub / github.com/WheretIB/nullc / vmIntPow

Function vmIntPow

NULLC/Executor.cpp:12–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#endif
11
12int vmIntPow(int power, int number)
13{
14 int result = 1;
15 while(power)
16 {
17 if(power & 1)
18 {
19 result *= number;
20 power--;
21 }
22 number *= number;
23 power >>= 1;
24 }
25 return result;
26}
27
28long long vmLongPow(long long num, long long pow)
29{

Callers 1

Executor.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected