I've just woken up and I can't think of the Cubescript for it now, but mathwise you could multiply the negative exponent by -1, calculate with that, then divide 1 by the result. Because
2^(-3) = 1 ÷ (2^3).
Edit: I've got it!
2^(-3) = 1 ÷ (2^3).
Edit: I've got it!
[SELECT ALL] Code:
//Exponent script "exp 5 2" = 5^2
alias powerloop [
(alias product (*f $base $product));
(alias power (+f $power 1));
(if (<f $power $pow) [powerloop] [result $product])]
alias exp [
(alias product 1);
(alias power 0);
(alias base $arg1);
if (<f $arg2 0) [alias pow (*f $arg2 -1); negexp = 1] [alias pow $arg2; negexp = 0];
if (!= $negexp 1) [powerloop base pow] [(divf 1 (powerloop base pow;))]
]