<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[std::accumulate und Potenzreihe]]></title><description><![CDATA[<p>Hallo ihr Lieben,</p>
<p>ich überlege gerade, wie ich mittels <code>std::accumulate</code> eine Potenzreihe ausrechnen kann. Sagen wir ich habe gegeben</p>
<p><span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>S</mi><mo>=</mo><msubsup><mo>∑</mo><mrow><mi>i</mi><mo>=</mo><mn>0</mn></mrow><mi>n</mi></msubsup><mspace width="0.16667em"></mspace><msub><mi>a</mi><mi>i</mi></msub><mspace width="0.16667em"></mspace><msup><mi>T</mi><mi>i</mi></msup></mrow><annotation encoding="application/x-tex">S = \sum_{i=0}^n \, a_i \, T^i</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:0.824664em;"></span><span class="strut bottom" style="height:1.124674em;vertical-align:-0.30001em;"></span><span class="base textstyle uncramped"><span class="mord mathit" style="margin-right:0.05764em;">S</span><span class="mrel">=</span><span class="mop"><span class="op-symbol small-op mop" style="top:-0.0000050000000000050004em;">∑</span><span class="vlist"><span style="top:0.30001em;margin-left:0em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle cramped"><span class="mord scriptstyle cramped"><span class="mord mathit">i</span><span class="mrel">=</span><span class="mord mathrm">0</span></span></span></span><span style="top:-0.364em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord mathit">n</span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mord mspace thinspace"></span><span class="mord"><span class="mord mathit">a</span><span class="vlist"><span style="top:0.15em;margin-right:0.05em;margin-left:0em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle cramped"><span class="mord mathit">i</span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mord mspace thinspace"></span><span class="mord"><span class="mord mathit" style="margin-right:0.13889em;">T</span><span class="vlist"><span style="top:-0.363em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord mathit">i</span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span></span></span></span></p>
<p>Die Koeffizienten <span class="katex"><span class="katex-mathml"><math><semantics><mrow><msub><mi>a</mi><mi>i</mi></msub></mrow><annotation encoding="application/x-tex">a_i</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:0.43056em;"></span><span class="strut bottom" style="height:0.58056em;vertical-align:-0.15em;"></span><span class="base textstyle uncramped"><span class="mord"><span class="mord mathit">a</span><span class="vlist"><span style="top:0.15em;margin-right:0.05em;margin-left:0em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle cramped"><span class="mord mathit">i</span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span></span></span></span> kann ich bequem in einem vector <code>std::vector&lt;double&gt; coef</code> speichern, d.h. ich könnte zu einem gegebenen T ansetzen</p>
<pre><code class="language-cpp">double T; // irgendein Wert
std::accumulate(coef.begin(), coef.end(), 0.0,
  [T](double sum, double a){ return sum + a * T; }
</code></pre>
<p>Das Problem ist nun, dass T derart potentziert werden muss, je nachdem an welcher Stelle das Aufsummieren im Vektor <code>coef</code> gerade steht. Mit iterator - Arithmetik wäre die Potenz gerade <code>iter - coef.begin()</code> .</p>
<p>Lässt sich das einbauen, also auf den verwendeten Iterator zugreifen?</p>
<p>Oder gibt es ganz andere elegante Ansätze - ich sehe es gerade als Programmierübung. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>Gruß,<br />
-- Klaus.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/324039/std-accumulate-und-potenzreihe</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 22:19:34 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/324039.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 28 Feb 2014 11:01:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 11:01:10 GMT]]></title><description><![CDATA[<p>Hallo ihr Lieben,</p>
<p>ich überlege gerade, wie ich mittels <code>std::accumulate</code> eine Potenzreihe ausrechnen kann. Sagen wir ich habe gegeben</p>
<p><span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>S</mi><mo>=</mo><msubsup><mo>∑</mo><mrow><mi>i</mi><mo>=</mo><mn>0</mn></mrow><mi>n</mi></msubsup><mspace width="0.16667em"></mspace><msub><mi>a</mi><mi>i</mi></msub><mspace width="0.16667em"></mspace><msup><mi>T</mi><mi>i</mi></msup></mrow><annotation encoding="application/x-tex">S = \sum_{i=0}^n \, a_i \, T^i</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:0.824664em;"></span><span class="strut bottom" style="height:1.124674em;vertical-align:-0.30001em;"></span><span class="base textstyle uncramped"><span class="mord mathit" style="margin-right:0.05764em;">S</span><span class="mrel">=</span><span class="mop"><span class="op-symbol small-op mop" style="top:-0.0000050000000000050004em;">∑</span><span class="vlist"><span style="top:0.30001em;margin-left:0em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle cramped"><span class="mord scriptstyle cramped"><span class="mord mathit">i</span><span class="mrel">=</span><span class="mord mathrm">0</span></span></span></span><span style="top:-0.364em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord mathit">n</span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mord mspace thinspace"></span><span class="mord"><span class="mord mathit">a</span><span class="vlist"><span style="top:0.15em;margin-right:0.05em;margin-left:0em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle cramped"><span class="mord mathit">i</span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mord mspace thinspace"></span><span class="mord"><span class="mord mathit" style="margin-right:0.13889em;">T</span><span class="vlist"><span style="top:-0.363em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord mathit">i</span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span></span></span></span></p>
<p>Die Koeffizienten <span class="katex"><span class="katex-mathml"><math><semantics><mrow><msub><mi>a</mi><mi>i</mi></msub></mrow><annotation encoding="application/x-tex">a_i</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:0.43056em;"></span><span class="strut bottom" style="height:0.58056em;vertical-align:-0.15em;"></span><span class="base textstyle uncramped"><span class="mord"><span class="mord mathit">a</span><span class="vlist"><span style="top:0.15em;margin-right:0.05em;margin-left:0em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle cramped"><span class="mord mathit">i</span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span></span></span></span> kann ich bequem in einem vector <code>std::vector&lt;double&gt; coef</code> speichern, d.h. ich könnte zu einem gegebenen T ansetzen</p>
<pre><code class="language-cpp">double T; // irgendein Wert
std::accumulate(coef.begin(), coef.end(), 0.0,
  [T](double sum, double a){ return sum + a * T; }
</code></pre>
<p>Das Problem ist nun, dass T derart potentziert werden muss, je nachdem an welcher Stelle das Aufsummieren im Vektor <code>coef</code> gerade steht. Mit iterator - Arithmetik wäre die Potenz gerade <code>iter - coef.begin()</code> .</p>
<p>Lässt sich das einbauen, also auf den verwendeten Iterator zugreifen?</p>
<p>Oder gibt es ganz andere elegante Ansätze - ich sehe es gerade als Programmierübung. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>Gruß,<br />
-- Klaus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385719</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385719</guid><dc:creator><![CDATA[Klaus82]]></dc:creator><pubDate>Fri, 28 Feb 2014 11:01:10 GMT</pubDate></item><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 11:05:13 GMT]]></title><description><![CDATA[<p>Der Accululator ist einfach ein Paar aus Summe und Index, also &lt;sum, index&gt;.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385720</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385720</guid><dc:creator><![CDATA[knivil]]></dc:creator><pubDate>Fri, 28 Feb 2014 11:05:13 GMT</pubDate></item><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 11:28:01 GMT]]></title><description><![CDATA[<p>knivil schrieb:</p>
<blockquote>
<p>Der Accululator ist einfach <strong>ein Paar</strong> aus Summe und Index, also &lt;sum, index&gt;.</p>
</blockquote>
<p>Meinst du damit<a href="http://www.cplusplus.com/reference/utility/pair/pair/" rel="nofollow"> <code>std::pair</code> </a>?</p>
<p>Gruß,<br />
-- Klaus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385724</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385724</guid><dc:creator><![CDATA[Klaus82]]></dc:creator><pubDate>Fri, 28 Feb 2014 11:28:01 GMT</pubDate></item><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 11:41:52 GMT]]></title><description><![CDATA[<p>Folgender Funktor anstatt dem Lambda:</p>
<pre><code>class S_functor
{
public:
  // Konstruktor

  double operator()(double sum, double coef)
  {
     auto t = std::pow(base_t_, i_++);
     return sum + coef * t;
  }

private:
  double base_t_;
  size_t i_ = 0;
};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2385728</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385728</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Fri, 28 Feb 2014 11:41:52 GMT</pubDate></item><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 11:47:12 GMT]]></title><description><![CDATA[<p>Klaus82 schrieb:</p>
<blockquote>
<p>Oder gibt es ganz andere elegante Ansätze - ich sehe es gerade als Programmierübung. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
</blockquote>
<p>Manche haben sowas wie integer-ranges oder -iteratoren. Damit und mit inner_product könnte es auch klappen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385731</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385731</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Fri, 28 Feb 2014 11:47:12 GMT</pubDate></item><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 11:57:58 GMT]]></title><description><![CDATA[<p>so:</p>
<pre><code>double coef[] = { 1, -4, -5 };
    for( double x; cin &gt;&gt; x; )
        cout &lt;&lt; &quot;f(&quot; &lt;&lt; x &lt;&lt; &quot;) = &quot; 
            &lt;&lt; accumulate( begin(coef), end(coef), 0.0, [x]( double sum, double a_i )-&gt;double { return sum * x + a_i; } ) 
            &lt;&lt; endl;
</code></pre>
<p>oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385735</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385735</guid><dc:creator><![CDATA[Werner_logoff]]></dc:creator><pubDate>Fri, 28 Feb 2014 11:57:58 GMT</pubDate></item><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 12:03:16 GMT]]></title><description><![CDATA[<p>Danke Werner, ich dachte schon keiner kennt hier das Horner-Schema.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385736</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385736</guid><dc:creator><![CDATA[Bashar]]></dc:creator><pubDate>Fri, 28 Feb 2014 12:03:16 GMT</pubDate></item><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 12:06:25 GMT]]></title><description><![CDATA[<p>Also ich bin es mal ohne <code>std::accumulate</code> mit einer for Schleife angegangen, vielleicht muss ich nicht immer mit Kanonen auf Spatzen schießen:</p>
<pre><code class="language-cpp">// T gegeben

double power_series = 0.0;

for(unsigned int = 0; i &lt; coef.size(); ++i)
  power_series += coef[ i ] * boost::units::pow&lt;i&gt;( T );
</code></pre>
<p>Nur jetzt knirscht es bei Boost, dass i nicht konstant wäre? Muss ich aus dem i in jedem Durchlauf eine Konstante basteln?</p>
<p>Gruß,<br />
-- Klaus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385737</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385737</guid><dc:creator><![CDATA[Klaus82]]></dc:creator><pubDate>Fri, 28 Feb 2014 12:06:25 GMT</pubDate></item><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 12:42:33 GMT]]></title><description><![CDATA[<p>boost::units::pow ist für Potenzierung zur Compiletime gedacht.<br />
Nimm std::pow für variable Potenzen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385748</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385748</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Fri, 28 Feb 2014 12:42:33 GMT</pubDate></item><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 12:47:02 GMT]]></title><description><![CDATA[<p>Nathan schrieb:</p>
<blockquote>
<p>boost::units::pow ist für Potenzierung zur Compiletime gedacht.<br />
Nimm std::pow für variable Potenzen.</p>
</blockquote>
<p>Okay, verstehe. Ich dache ich könnte gleich die 'schnellere' Variante von <code>boost</code> nehmen.</p>
<p>Gruß,<br />
-- Klaus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385749</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385749</guid><dc:creator><![CDATA[Klaus82]]></dc:creator><pubDate>Fri, 28 Feb 2014 12:47:02 GMT</pubDate></item><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 12:54:28 GMT]]></title><description><![CDATA[<p>Klaus82 schrieb:</p>
<blockquote>
<p>Nathan schrieb:</p>
<blockquote>
<p>boost::units::pow ist für Potenzierung zur Compiletime gedacht.<br />
Nimm std::pow für variable Potenzen.</p>
</blockquote>
<p>Okay, verstehe. Ich dache ich könnte gleich die 'schnellere' Variante von <code>boost</code> nehmen.</p>
</blockquote>
<p>Die ist nur schneller, wenn der Wert zur Compilezeit feststeht.<br />
Aus pow&lt;2&gt;(x) macht sie nämlich x*x und so für alle kleineren (?) Potenzen.<br />
Das geht aber nicht, wenn das eine Variable ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385750</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385750</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Fri, 28 Feb 2014 12:54:28 GMT</pubDate></item><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 13:16:46 GMT]]></title><description><![CDATA[<p>Klaus82 schrieb:</p>
<blockquote>
<p>Ich dache ich könnte gleich die 'schnellere' Variante von <code>boost</code> nehmen.</p>
</blockquote>
<p>Die wäre auch nicht schneller als das simple Horner Schema (s. 12:57:58) - eher im Gegenteil!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385757</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385757</guid><dc:creator><![CDATA[Werner_logoff]]></dc:creator><pubDate>Fri, 28 Feb 2014 13:16:46 GMT</pubDate></item><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 13:16:54 GMT]]></title><description><![CDATA[<blockquote>
<p>Aus pow&lt;2&gt;(x) macht sie nämlich x*x und so für alle kleineren (?) Potenzen.</p>
</blockquote>
<p>Das geht mit TMP fuer alle Exponenten. Zumindest seit C++11.</p>
<p>Horner-Schema ist hier aber ein Muss.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385758</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385758</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Fri, 28 Feb 2014 13:16:54 GMT</pubDate></item><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 13:23:16 GMT]]></title><description><![CDATA[<p>Arcoth schrieb:</p>
<blockquote>
<blockquote>
<p>Aus pow&lt;2&gt;(x) macht sie nämlich x*x und so für alle kleineren (?) Potenzen.</p>
</blockquote>
<p>Das geht mit TMP fuer alle Exponenten. Zumindest seit C++11.</p>
</blockquote>
<p>Das ist mir klar, dass das mit allen geht.<br />
Ich hab mich nur gefragt, ob es eventuell bei pow&lt;1000&gt;(x) oder so, vielleicht effizienter wäre, das mit einer Schleife zu machen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385761</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385761</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Fri, 28 Feb 2014 13:23:16 GMT</pubDate></item><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 13:29:12 GMT]]></title><description><![CDATA[<p>Nathan schrieb:</p>
<blockquote>
<p>Arcoth schrieb:</p>
<blockquote>
<blockquote>
<p>Aus pow&lt;2&gt;(x) macht sie nämlich x*x und so für alle kleineren (?) Potenzen.</p>
</blockquote>
<p>Das geht mit TMP fuer alle Exponenten. Zumindest seit C++11.</p>
</blockquote>
<p>Das ist mir klar, dass das mit allen geht.<br />
Ich hab mich nur gefragt, ob es eventuell bei pow&lt;1000&gt;(x) oder so, vielleicht effizienter wäre, das mit einer Schleife zu machen.</p>
</blockquote>
<p>Na ja - bei einer Schleife wären es wahrscheinlich 999 Multiplikationen und wie ich die boost-people kenne, schafft es pow&lt;1000&gt;(x) mit ca. einem Dutzend Multiplikationen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385762</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385762</guid><dc:creator><![CDATA[Werner_logoff]]></dc:creator><pubDate>Fri, 28 Feb 2014 13:29:12 GMT</pubDate></item><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 13:53:07 GMT]]></title><description><![CDATA[<blockquote>
<p>Ich hab mich nur gefragt, ob es eventuell bei pow&lt;1000&gt;(x) oder so, vielleicht effizienter wäre, das mit einer Schleife zu machen.</p>
</blockquote>
<p>Auf gar keinen Fall. Square and Multiply wenden die an.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385768</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385768</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Fri, 28 Feb 2014 13:53:07 GMT</pubDate></item><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 14:24:12 GMT]]></title><description><![CDATA[<p>Arcoth schrieb:</p>
<blockquote>
<blockquote>
<p>Ich hab mich nur gefragt, ob es eventuell bei pow&lt;1000&gt;(x) oder so, vielleicht effizienter wäre, das mit einer Schleife zu machen.</p>
</blockquote>
<p>Auf gar keinen Fall. Square and Multiply wenden die an.</p>
</blockquote>
<p>Auf gar keinen Fall! Für doubles nehmen die den ensprechenden Opcode.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385772</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385772</guid><dc:creator><![CDATA[FYL2X]]></dc:creator><pubDate>Fri, 28 Feb 2014 14:24:12 GMT</pubDate></item><item><title><![CDATA[Reply to std::accumulate und Potenzreihe on Fri, 28 Feb 2014 14:58:38 GMT]]></title><description><![CDATA[<p>Klaus82 schrieb:</p>
<blockquote>
<p>Also ich bin es mal ohne <code>std::accumulate</code> mit einer for Schleife angegangen, vielleicht muss ich nicht immer mit Kanonen auf Spatzen schießen:</p>
</blockquote>
<p>D.h. du hast das Beispiel von Werner nicht verstanden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385780</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385780</guid><dc:creator><![CDATA[knivil]]></dc:creator><pubDate>Fri, 28 Feb 2014 14:58:38 GMT</pubDate></item></channel></rss>