{"id":273,"date":"2007-12-03T13:16:33","date_gmt":"2007-12-03T13:16:33","guid":{"rendered":"http:\/\/pchero21.com\/?p=273"},"modified":"2007-12-03T13:16:33","modified_gmt":"2007-12-03T13:16:33","slug":"log2-%eb%b0%91%ec%9d%b4-2%ec%9d%b8-%eb%a1%9c%ea%b7%b8-%ed%95%a8%ec%88%98-log-ln-log10%ec%83%81%ec%9a%a9-%eb%a1%9c%ea%b7%b8-%ea%b5%ac%ed%95%98%ea%b8%b0","status":"publish","type":"post","link":"http:\/\/pchero21.com\/?p=273","title":{"rendered":"log2 (\ubc11\uc774 2\uc778 \ub85c\uadf8 \ud568\uc218), log (ln), log10(\uc0c1\uc6a9 \ub85c\uadf8) \uad6c\ud558\uae30"},"content":{"rendered":"<p>C\uc5d0\ub294 \uc790\uc5f0\ub85c\uadf8(Natural Logarithm)\ub97c \uad6c\ud558\ub294 log() \ud568\uc218\uc640, \ubc11(Base)\uc774 10\uc778 \uc0c1\uc6a9 \ub85c\uadf8\ub97c \uad6c\ud558\ub294 log10() \ud568\uc218\ub9cc \uc788\uae30\uc5d0, \ubc11\uc774 2\uc778 \ub85c\uadf8 \ub4f1\uc744 \uad6c\ud558\ub824\uba74 \uc9c1\uc811 \ud568\uc218\ub97c \ub9cc\ub4e4\uc5b4\uc57c \ud55c\ub2e4. \uc544\ub798 \uc608\uc81c\uc5d0 logB() \ub77c\ub294 \ud568\uc218\uac00 \uc788\ub294\ub370<\/p>\n<p><strong>logB(\uc22b\uc790, \ubc11)<\/strong><\/p>\n<p>\uc774\ub7f0 \ud615\uc2dd\uc73c\ub85c \uc784\uc758\uc758 \uc2e4\uc218\ub97c \ubc11\uc73c\ub85c \uc9c0\uc815\ud560 \uc218 \uc788\ub2e4.<\/p>\n<p><\/p>\n<h3>C\uc5d0\uc11c, \uc790\uc5f0\ub85c\uadf8, \uc0c1\uc6a9\ub85c\uadf8, \ubc11(Base)\uc774 2\uc778 \ub85c\uadf8 \uacc4\uc0b0 \uc608\uc81c<\/h3>\n<p><\/p>\n<div style=\"padding: 10px; background-color: rgb(228, 228, 228);\">\n<div class=\"wasabi-code-box\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">#include &lt;stdio.h&gt;<\/span><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">#include &lt;math.h&gt;<\/span><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">double logB(double x, double base);<\/span><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">int main(void) {<\/span><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">&nbsp; puts(&#8221; &nbsp;\uc790\uc5f0 \ub85c\uadf8 :n&#8221;);<\/span><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">&nbsp; for (double d = 1.0; d &lt;= 10.0; d++)<\/span><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">&nbsp; &nbsp; printf(&#8221; &nbsp; ln(%2.0f) = %.16fn&#8221;, d, log(d));<\/span><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">&nbsp; puts(&#8220;nnn &nbsp;\uc0c1\uc6a9 \ub85c\uadf8 :n&#8221;);<\/span><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">&nbsp; for (double d = 1.0; d &lt;= 10.0; d++)<\/span><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">&nbsp; &nbsp; printf(&#8220;log10(%2.0f) = %.16fn&#8221;, d, log10(d));<\/span><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">&nbsp; puts(&#8220;nnn &nbsp;\ubc11\uc774 2\uc778 \ub85c\uadf8 :n&#8221;);<\/span><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">&nbsp; for (double d = 1.0; d &lt;= 10.0; d++)<\/span><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">&nbsp; &nbsp; printf(&#8221; log2(%2.0f) = %.16fn&#8221;, d, logB(d, 2.0));<\/span><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">&nbsp; return 0;<\/span><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">}<\/span><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">double logB(double x, double base) {<\/span><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">&nbsp; return log(x) \/ log(base);<\/span><br style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\"><span style=\"color: rgb(0, 0, 0); background-color: rgb(228, 228, 228);\">}<\/span><\/div>\n<p><\/div>\n<p>\ucd9c\ucc98 : <a href=\"http:\/\/mwultong.blogspot.com\/\" target=\"_blank\">http:\/\/mwultong.blogspot.com\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>C\uc5d0\ub294 \uc790\uc5f0\ub85c\uadf8(Natural Logarithm)\ub97c \uad6c\ud558\ub294 log() \ud568\uc218\uc640, \ubc11(Base)\uc774 10\uc778 \uc0c1\uc6a9 \ub85c\uadf8\ub97c \uad6c\ud558\ub294 log10() \ud568\uc218\ub9cc \uc788\uae30\uc5d0, \ubc11\uc774 2\uc778 \ub85c\uadf8 \ub4f1\uc744 \uad6c\ud558\ub824\uba74 \uc9c1\uc811 \ud568\uc218\ub97c \ub9cc\ub4e4\uc5b4\uc57c \ud55c\ub2e4. \uc544\ub798 \uc608\uc81c\uc5d0 logB() \ub77c\ub294 \ud568\uc218\uac00 \uc788\ub294\ub370 logB(\uc22b\uc790, \ubc11) \uc774\ub7f0 \ud615\uc2dd\uc73c\ub85c \uc784\uc758\uc758 \uc2e4\uc218\ub97c \ubc11\uc73c\ub85c \uc9c0\uc815\ud560 \uc218 \uc788\ub2e4. C\uc5d0\uc11c, &hellip; <a href=\"http:\/\/pchero21.com\/?p=273\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[40],"tags":[],"_links":{"self":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts\/273"}],"collection":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=273"}],"version-history":[{"count":0,"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts\/273\/revisions"}],"wp:attachment":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=273"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}