1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | double myPow(double x, int n){ if(n==0)return 1; else if(n<0){ if(n==INT_MIN){ double t=myPow(x,-(n>>1)); return 1/(t*t); } else{ return 1/myPow(x,-n); } } else{ double t=myPow(x,n>>1); if(n&1==1){ return x*t*t; } else{ return t*t; } } } |

Every weekend i used to go to see this web site, because i want enjoyment,

for the reason that this this web site conations actually pleasant funny information too.

Just bookmarked this post as I have actually found it rather handy.

I could not resist commenting. Well written!