-
1
- #1
dhazer
Programmer
- Oct 20, 2006
- 48
Thread thread448-392425 wanted a function for exponential calculations, so here's one for the archive:
func exponentiate : integer
param integer base
param integer exponent
integer counter, tempbase
tempbase = 1
if exponent == 0
return 1
elseif exponent == 1
return base
else
for counter = 1 upto exponent
tempbase = tempbase * base
endfor
endif
return tempbase
endfunc
func exponentiate : integer
param integer base
param integer exponent
integer counter, tempbase
tempbase = 1
if exponent == 0
return 1
elseif exponent == 1
return base
else
for counter = 1 upto exponent
tempbase = tempbase * base
endfor
endif
return tempbase
endfunc