{"id":849,"date":"2022-12-15T10:15:02","date_gmt":"2022-12-15T10:15:02","guid":{"rendered":"https:\/\/blog.liuyingjie.com.cn\/?p=849"},"modified":"2023-08-13T08:17:50","modified_gmt":"2023-08-13T08:17:50","slug":"binary-logarithm","status":"publish","type":"post","link":"https:\/\/blog.liuyingjie.com.cn\/?p=849","title":{"rendered":"Binary logarithm"},"content":{"rendered":"\n<p>In mathematics, the logarithm with the base of 2 <code class=\"katex-inline\">(log<sup>2<\/sup><em>n<\/em>)<\/code>, also known as binary logarithm, is to obtain the exponent that n must be raised to the power of 2.<\/p>\n\n\n\n<p>That is, for any real number x,<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.liuyingjie.com.cn\/wp-content\/uploads\/2022\/12\/xlog2n.svg\" alt=\"\"\/><\/figure>\n\n\n\n<p>For example: log2 1 = 0\uff0clog2 2 = 1\uff0clog2 4 = 2\uff0clog2 8 = 3, log2 16 = 4, log2 32 = 5<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In mathematics, the logarithm with the base of 2 (log2n &hellip; <a href=\"https:\/\/blog.liuyingjie.com.cn\/?p=849\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">Binary logarithm<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-849","post","type-post","status-publish","format-standard","hentry","category-mathematics"],"_links":{"self":[{"href":"https:\/\/blog.liuyingjie.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/849","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.liuyingjie.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.liuyingjie.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.liuyingjie.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.liuyingjie.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=849"}],"version-history":[{"count":6,"href":"https:\/\/blog.liuyingjie.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/849\/revisions"}],"predecessor-version":[{"id":1000,"href":"https:\/\/blog.liuyingjie.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/849\/revisions\/1000"}],"wp:attachment":[{"href":"https:\/\/blog.liuyingjie.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.liuyingjie.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.liuyingjie.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}