RosettaCodeData/Task/Exponentiation-operator/Lucid/exponentiation-operator.lucid
2023-07-01 13:44:08 -04:00

6 lines
117 B
Text

pow(n,x)
k = n fby k div 2;
p = x fby p*p;
y =1 fby if even(k) then y else y*p;
result y asa k eq 0;
end