1
vote
2answers
131 views

Cycling through powers of a generator of finite field. Something similar to modpow for Z/nZ

I am not sure if I am talking to the correct community (perhaps stack overflow is best). I want to be able to compute $$g^x = \underbrace{g \cdot g \cdot \dots \cdot g}_\text{x amount of times}$$ ...