ã¡ãã£ã¨åã«ãx^yãè¨ç®ããããªã£ããxã¯ã¨ããããyãæµ®åå°æ°ç¹ã®ç¯å²ã«ããæ°ãªã®ã§ãåç´ãªä»¥ä¸ã®é¢æ°ã¯ä½¿ããªãã double pow(double x, int y){ if(y == 0) return 1; if(y == 1) return x; tmp = pow(x, y/2); if(y % 2 == 0){ return tmp * tmp; }else{ return tmp * tmp * x; } } ãããªãã¨è¨ããã¨ã§ãããåãããªãã¾ã¾ã« ãããªæãã®ãã®ãæ¸ãã¦ã¿ãã double pow(double x, double y){ double ans = pow(x, (int)y);//ä¸ã®powãå¼ã³åºã double d = 1.0/2; double m = Math.sqrt(x); y -= (int)y; while(d > 1E-5){
{{#tags}}- {{label}}
{{/tags}}