<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=%E7%B4%AF%E4%B9%97</id>
	<title>累乗 - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=%E7%B4%AF%E4%B9%97"/>
	<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=%E7%B4%AF%E4%B9%97&amp;action=history"/>
	<updated>2026-06-04T02:36:49Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://monobook.org/w/index.php?title=%E7%B4%AF%E4%B9%97&amp;diff=13471&amp;oldid=prev</id>
		<title>2020年8月11日 (火) 02:53にAdministratorによる</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=%E7%B4%AF%E4%B9%97&amp;diff=13471&amp;oldid=prev"/>
		<updated>2020-08-11T02:53:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2020年8月11日 (火) 02:53時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l11&quot;&gt;11行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;11行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ただし[[冪乗]]&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;の計算は自然数以外も扱える汎用性の高さの代償として非常に計算量が多いため、累乗しか使わないのであれば自前で簡単な関数を実装した方が高速な場合が多い。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ただし[[冪乗]]&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;の計算は自然数以外（浮動小数点）も扱える汎用性の高さの代償として非常に計算量が多いため、累乗（指数部に整数）しか使わないのであれば自前で簡単な関数を実装した方が高速な場合が多い。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Administrator</name></author>
	</entry>
	<entry>
		<id>https://monobook.org/w/index.php?title=%E7%B4%AF%E4%B9%97&amp;diff=13470&amp;oldid=prev</id>
		<title>2020年8月11日 (火) 02:52にAdministratorによる</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=%E7%B4%AF%E4%B9%97&amp;diff=13470&amp;oldid=prev"/>
		<updated>2020-08-11T02:52:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2020年8月11日 (火) 02:52時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;1行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;1行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;累乗&#039;&#039;&#039;（るいじょう、[[英語]]：repeated multiplication）とは、[[冪乗]]（べきじょう）の[[指数]]&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;部が1以上の&lt;/del&gt;[[自然数]]&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;なものをいう。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;累乗&#039;&#039;&#039;（るいじょう、[[英語]]：repeated multiplication）とは、[[冪乗]]（べきじょう）の[[指数]]&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;部が「1以上の&lt;/ins&gt;[[自然数]]&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;（[[整数]]）」なものをいう。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ほとんどの[[プログラミング言語]]には[[冪乗]]を計算する[[関数]]は標準搭載されているが、累乗を計算する関数はないことが多く、累乗の計算は冪乗の結果を[[整数]]に[[キャスト]]することで得るようになっていることが多い。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ほとんどの[[プログラミング言語]]には[[冪乗]]を計算する[[関数]]は標準搭載されているが、累乗を計算する関数はないことが多く、累乗の計算は冪乗の結果を[[整数]]に[[キャスト]]することで得るようになっていることが多い。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Administrator</name></author>
	</entry>
	<entry>
		<id>https://monobook.org/w/index.php?title=%E7%B4%AF%E4%B9%97&amp;diff=13456&amp;oldid=prev</id>
		<title>Administrator: ページの作成:「&#039;&#039;&#039;累乗&#039;&#039;&#039;（るいじょう、英語：repeated multiplication）とは、冪乗（べきじょう）の指数部が1以上の自然数なものをい…」</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=%E7%B4%AF%E4%B9%97&amp;diff=13456&amp;oldid=prev"/>
		<updated>2020-08-04T05:55:52Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「&amp;#039;&amp;#039;&amp;#039;累乗&amp;#039;&amp;#039;&amp;#039;（るいじょう、&lt;a href=&quot;/wiki/%E8%8B%B1%E8%AA%9E&quot; title=&quot;英語&quot;&gt;英語&lt;/a&gt;：repeated multiplication）とは、&lt;a href=&quot;/wiki/%E5%86%AA%E4%B9%97&quot; title=&quot;冪乗&quot;&gt;冪乗&lt;/a&gt;（べきじょう）の&lt;a href=&quot;/w/index.php?title=%E6%8C%87%E6%95%B0&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;「指数」 (存在しないページ)&quot;&gt;指数&lt;/a&gt;部が1以上の&lt;a href=&quot;/w/index.php?title=%E8%87%AA%E7%84%B6%E6%95%B0&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;「自然数」 (存在しないページ)&quot;&gt;自然数&lt;/a&gt;なものをい…」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;累乗&amp;#039;&amp;#039;&amp;#039;（るいじょう、[[英語]]：repeated multiplication）とは、[[冪乗]]（べきじょう）の[[指数]]部が1以上の[[自然数]]なものをいう。&lt;br /&gt;
&lt;br /&gt;
ほとんどの[[プログラミング言語]]には[[冪乗]]を計算する[[関数]]は標準搭載されているが、累乗を計算する関数はないことが多く、累乗の計算は冪乗の結果を[[整数]]に[[キャスト]]することで得るようになっていることが多い。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
 // 冪乗関数はこんな感じ&lt;br /&gt;
 double Math.Pow(double x, double y);&lt;br /&gt;
&lt;br /&gt;
 // 累乗は結果をキャストすることで得るようになっていることが多い。&lt;br /&gt;
 int r = (int)Math.Pow(3,11);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ただし[[冪乗]]の計算は自然数以外も扱える汎用性の高さの代償として非常に計算量が多いため、累乗しか使わないのであれば自前で簡単な関数を実装した方が高速な場合が多い。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
    using System;&lt;br /&gt;
    using BenchmarkDotNet.Attributes;&lt;br /&gt;
    using BenchmarkDotNet.Running;&lt;br /&gt;
&lt;br /&gt;
    public class Program&lt;br /&gt;
    {&lt;br /&gt;
        public static void Main(string[] args)&lt;br /&gt;
        {&lt;br /&gt;
            var switcher = BenchmarkRunner.Run&amp;lt;Program&amp;gt;();&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // 冪乗の結果をキャストする&lt;br /&gt;
        [Benchmark]&lt;br /&gt;
        [Arguments(3, 11)]&lt;br /&gt;
        public int PowA(int x, uint exponent)&lt;br /&gt;
        {&lt;br /&gt;
            return (int)Math.Pow(x, exponent);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // 累乗：教科書どおりの力技&lt;br /&gt;
        [Benchmark]&lt;br /&gt;
        [Arguments(3,11)]&lt;br /&gt;
        public int PowB(int x, uint exponent)&lt;br /&gt;
        {&lt;br /&gt;
            int r = 1;&lt;br /&gt;
            for (int n = 0; n &amp;lt; exponent; n++)&lt;br /&gt;
            {&lt;br /&gt;
                r = r * x;&lt;br /&gt;
            }&lt;br /&gt;
            return r;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // 累乗：アルゴリズム最適化&lt;br /&gt;
        [Benchmark]&lt;br /&gt;
        [Arguments(3, 11)]&lt;br /&gt;
        public int PowC(int x, uint exponent)&lt;br /&gt;
        {&lt;br /&gt;
            int ret = 1;&lt;br /&gt;
            while (exponent != 0)&lt;br /&gt;
            {&lt;br /&gt;
                if ((exponent &amp;amp; 1) == 1)&lt;br /&gt;
                {// 奇数&lt;br /&gt;
                    ret *= x;&lt;br /&gt;
                }&lt;br /&gt;
                x *= x;&lt;br /&gt;
                exponent &amp;gt;&amp;gt;= 1;&lt;br /&gt;
            }&lt;br /&gt;
            return ret;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Administrator</name></author>
	</entry>
</feed>