x power y?

This is a discussion on x power y? within the C++ Programming forums, part of the General Programming Boards category; I made the following function to calculate x power y..
I'd like to upgrade it to make it possible to ...

Thanks Sang-drax

I couldn't figure it out either. I was thinking that maybe logs were the answer... But, I don't know how to do logs "by hand" either. (Trial & error and interpolation?) So, you still have to use math.h. I know they (the Greeks?) were doing logs long before calculators and computers... Somebody had to figure out where to put the marks on the slide rule!