2007-11-01ãã1ã¶æéã®è¨äºä¸è¦§
http://blog.livedoor.jp/dankogai/archives/50958771.html O(1)ã®è¨ç®æ¹æ³ãç´¹ä»ããã¦ããããroundãã¤ããã®ã¯ã¡ãã£ã¨æ°æã¡æªãï¼64ãããæ´æ°ãæ±ããã®ã«ã80ãããã®æµ®åå°æ°ç¹æ°ã®è¨ç®ã§ã¯è¿½ãã¤ããªãï¼ï¼ã¨ãã人ã®ããã«ãO(logn)ã§è¨ç®ããæ¹â¦
ä¸è¬ã® c ã«å¯¾ãã¦ã ã解ãã ããã§ã ã¨ããã ãã ããaã¯èé¨ãå®é¨ã®çµ¶å¯¾å¤ãã大ããã aã®çµ¶å¯¾å¤ã1ãã大ãããªãããã«èé¨ã調æ´ãã¦ããã ããããã¨ã 以åã¨åããããªã°ã©ããæãã¦ãåãããã«è§£ããã 以ä¸ãã½ã¼ã¹ã ãã ãããã¾ãæ¤è¨¼â¦
ã解ãã åãããã«ã ã解ãã°ããã ããªãã¡ãã®ãã¨ãªãç¹ãåãã°ããã ã¯ãåãã°ã©ãã§ãã¨ãªãç¹ãåãã°ããã
ååãã°ã©ãã§è§£ã®åå¨ã ã示ãããã ããã ãã§ã¯ãã¿ããã®ã§ãå ·ä½çæ°å¤ãæ±ãã¦ã¿ããã ã°ã©ãã«ããã¨ãwã0ã«è¿ãã¨ããã«è§£ãããã®ã§ã ãããæ±ãã¦ã¿ãã ä¸ãããwã¯å°ããã®ã§ã ãããä¸ã«ä»£å ¥ãã¦ã Xã¯ãããªãã«å¤§ããã®ã§ãlog(2Ïn)ã¨â¦
ã¾ããzz = 1 ã®è§£ãèããã ã¨ããï¼x, y, s, tã¯å®æ°ï¼ã ããã nã¯æ´æ°ã nã0ãªããuã0ã§ãzã¯1ã¨ãªãã nã¯æ£ã¨ãããè² ãªãå ±å½¹è¤ç´ æ°ãèããã°ããã åã³ã ã¨ããã¨ï¼v, wã¯å®æ°ï¼ã æå¾ã¯å¤ä¾¡ã ããããã ãèããã°ããã ããããã ããã®â¦
åã«èªãã ãã®æ¬ã®å·»æ«ã§ã zzã®éé¢æ°ã«ã¤ãã¦è¨åããã¦ãããxã®xä¹ã®ã¯ãªã (ã¯ããããæ°å¦)ä½è : ååºåæ,ä¸éå¥ç¾,é«æ©é½ä¸é,浪å·å¹¸å½¦åºç社/ã¡ã¼ã«ã¼: æ¥æ¬è©è«ç¤¾çºå£²æ¥: 2002/07ã¡ãã£ã¢: åè¡æ¬ãã®ååãå«ãããã° (3件) ãè¦ãèå¯ã¯ããã¦â¦
ãã¨ã®ããã«ã¾ã¨ãã¦ãããã Dè¨èªã§ã®è¤ç´ æ° ãããã http://d.hatena.ne.jp/inamori/20071005/p1exp http://d.hatena.ne.jp/inamori/20071008/p1cos/sin/tan http://d.hatena.ne.jp/inamori/20071009/p1log http://d.hatena.ne.jp/inamori/20071011/p1sâ¦
cdouble exp(cdouble z)ãªã©ãå®è£ ãã¦ãããã cdouble以å¤ã®cfloatãcrealãåãã³ã¼ãã§æ¸ãã ä½åº¦ãåãã³ã¼ããæ¸ããããªãã¨ãã Dè¨èªã§ã¯mixinã使ããããã import std.cstream;void main(char[][] args) { dout.writefln(pow(2.0f, 5)); dout.wâ¦