x*p; return p; } This implementation needs 2log(n) recursive calls. e.g. 2^64 doesn't take 64 recursive calls but only 6. This mechanism is called ' divide and conquer ' and is quite a powerful trick. kind regards, Jos Last edited by JosAH; 03-21-2010 at 08:37 AM . Reply With Quote 03-21-2010,  01:43 PM