<?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[größte zahl wird nicht gefunden.]]></title><description><![CDATA[<p>also irgendwie werden die zahlen schon korrekt ausgegeben, aber die größte nicht ermittelt. irgendwie funktioniert der vergleich nicht!</p>
<p>dh, dass bei dieser ausgabe immer 0.00488934 rauskommen würde. und das ist vollkommen unsinnig, weil 1.31286e+4467 viel größer ist. theoretish müsste es doch klappen?!</p>
<pre><code>0.00488934
0e-95
1.21564e+4465
-0e-3679
1.31286e+4467
0
-1.83551e-4580
-4.50689e+1783
2.86156e-4933
</code></pre>
<pre><code class="language-cpp">long double greatestVal;
	int index[bilder];
	for(int c = 0; c &lt; bilder; c++) {
		greatestVal = outP[c][0];
		for(int i = 0; i &lt; Size; i++) {
			std::cout &lt;&lt; outP[c][i] &lt;&lt; std::endl;
			if(outP[c][i] &gt; greatestVal) { //klappt einfach nicht
				std::cout &lt;&lt; outP[c][i] &lt;&lt; &quot; &gt; &quot; &lt;&lt; greatestVal &lt;&lt; std::endl;
				greatestVal = outP[c][i];
				index[c] = i;
			}
		}
	}
</code></pre>
<p>hat jemand eine idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/213835/größte-zahl-wird-nicht-gefunden</link><generator>RSS for Node</generator><lastBuildDate>Tue, 13 Oct 2026 21:53:31 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/213835.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 22 May 2008 16:11:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to größte zahl wird nicht gefunden. on Thu, 22 May 2008 16:11:27 GMT]]></title><description><![CDATA[<p>also irgendwie werden die zahlen schon korrekt ausgegeben, aber die größte nicht ermittelt. irgendwie funktioniert der vergleich nicht!</p>
<p>dh, dass bei dieser ausgabe immer 0.00488934 rauskommen würde. und das ist vollkommen unsinnig, weil 1.31286e+4467 viel größer ist. theoretish müsste es doch klappen?!</p>
<pre><code>0.00488934
0e-95
1.21564e+4465
-0e-3679
1.31286e+4467
0
-1.83551e-4580
-4.50689e+1783
2.86156e-4933
</code></pre>
<pre><code class="language-cpp">long double greatestVal;
	int index[bilder];
	for(int c = 0; c &lt; bilder; c++) {
		greatestVal = outP[c][0];
		for(int i = 0; i &lt; Size; i++) {
			std::cout &lt;&lt; outP[c][i] &lt;&lt; std::endl;
			if(outP[c][i] &gt; greatestVal) { //klappt einfach nicht
				std::cout &lt;&lt; outP[c][i] &lt;&lt; &quot; &gt; &quot; &lt;&lt; greatestVal &lt;&lt; std::endl;
				greatestVal = outP[c][i];
				index[c] = i;
			}
		}
	}
</code></pre>
<p>hat jemand eine idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1514420</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1514420</guid><dc:creator><![CDATA[dumble]]></dc:creator><pubDate>Thu, 22 May 2008 16:11:27 GMT</pubDate></item><item><title><![CDATA[Reply to größte zahl wird nicht gefunden. on Thu, 22 May 2008 16:37:05 GMT]]></title><description><![CDATA[<p>wenn outP[c][0] immer schon das maximum enthält, wird der teil im if-block nie ausgeführt.</p>
<p>ersetz mal deine zeile 4 durch</p>
<pre><code class="language-cpp">greatestVal = std::numeric_limits&lt;double&gt;::min();
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1514432</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1514432</guid><dc:creator><![CDATA[minimus maximus]]></dc:creator><pubDate>Thu, 22 May 2008 16:37:05 GMT</pubDate></item><item><title><![CDATA[Reply to größte zahl wird nicht gefunden. on Thu, 22 May 2008 17:54:53 GMT]]></title><description><![CDATA[<p>scheiß drauf, schon am anfang die größte zahl gefunden wurde oder nicht. so spare ich sogar noch rechenzeit.<br />
aber das problöem ist, dass die bedingung nie erfüllt wird, obwohl größere zahlen vorhanden sind, deshlab hilft dein tip leider nicht. und ich verstehe nicht warum!!! das ist der behindertste fehler den ich je hatte.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1514504</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1514504</guid><dc:creator><![CDATA[dumble]]></dc:creator><pubDate>Thu, 22 May 2008 17:54:53 GMT</pubDate></item><item><title><![CDATA[Reply to größte zahl wird nicht gefunden. on Thu, 22 May 2008 18:30:49 GMT]]></title><description><![CDATA[<pre><code>5.13001e-4937 &gt; 0
</code></pre>
<p>eben auch wieder eine tolle ausgabe erhalten... aber mal im ernst, das ist nicht logisch nachvollziehbar!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1514528</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1514528</guid><dc:creator><![CDATA[dumble]]></dc:creator><pubDate>Thu, 22 May 2008 18:30:49 GMT</pubDate></item><item><title><![CDATA[Reply to größte zahl wird nicht gefunden. on Thu, 22 May 2008 18:38:20 GMT]]></title><description><![CDATA[<p>war ein speicherfehler, aber warum wird datenmüll nicht verglichen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1514534</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1514534</guid><dc:creator><![CDATA[dumble]]></dc:creator><pubDate>Thu, 22 May 2008 18:38:20 GMT</pubDate></item><item><title><![CDATA[Reply to größte zahl wird nicht gefunden. on Thu, 22 May 2008 19:12:00 GMT]]></title><description><![CDATA[<pre><code>greatestVal = outP[c][0];
</code></pre>
<p>- was macht das wohl bei jedem außer dem letzten äußeren Schleifendurchlauf?</p>
<pre><code>greatest = minimum;
for( int i=0; i&lt;outer_size; ++i)
{
	for( int j=0; j&lt;inner_size; ++j)
	{
		if( outP[i][j] &gt; greatest )
			greatest = outP[i][j];
	}
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1514566</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1514566</guid><dc:creator><![CDATA[EOP]]></dc:creator><pubDate>Thu, 22 May 2008 19:12:00 GMT</pubDate></item></channel></rss>