integer exponentiation

How do you handle it -- roll your own function, or use something off-the-shelf?
Role your own I suppose. Integers aren't too tricky to handle.
Yeah, I suppose you're right...it just still amazes me that C++ doesn't provide a function for this.
Why should it? You rarely need to work with integer types for this kind of math.

That said, there are simple methods for it:
http://eli.thegreenplace.net/2009/03/21/efficient-integer-exponentiation-algorithms/

Hope this helps.
Topic archived. No new replies allowed.