This will handle fractional and negative base numbers and negative exponents. It will not handle fractional exponents, but it does handle n^0 :
Code:
Function Pwr($i,Optional $p)

If Not $p $p=2 EndIf

If $p<0
$p=0-$p
$i=1.0/$i
EndIf

$Pwr=1.0

While $p
$Pwr=$Pwr*$i
$p=$p-1
Loop

EndFunction