<?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[Kommazahlen]]></title><description><![CDATA[<p>Wie kommt es, dass wenn ich</p>
<pre><code class="language-cpp">double z1 = 1.33;
z1 *= 1.33;
cout &lt;&lt; z1 &lt;&lt; endl;
</code></pre>
<p>schreibe ein falsches Ergebnis (1.7689) ausgegeben wird. Sogar mit long double???</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/310141/kommazahlen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 05 Aug 2026 02:33:52 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/310141.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 04 Nov 2012 19:21:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Kommazahlen on Sun, 04 Nov 2012 19:21:15 GMT]]></title><description><![CDATA[<p>Wie kommt es, dass wenn ich</p>
<pre><code class="language-cpp">double z1 = 1.33;
z1 *= 1.33;
cout &lt;&lt; z1 &lt;&lt; endl;
</code></pre>
<p>schreibe ein falsches Ergebnis (1.7689) ausgegeben wird. Sogar mit long double???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2267369</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2267369</guid><dc:creator><![CDATA[reverser]]></dc:creator><pubDate>Sun, 04 Nov 2012 19:21:15 GMT</pubDate></item><item><title><![CDATA[Reply to Kommazahlen on Sun, 04 Nov 2012 19:23:23 GMT]]></title><description><![CDATA[<p>1.33*1.33 gibt nunmal 1.7689, da ist nichts zu machen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2267370</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2267370</guid><dc:creator><![CDATA[dertroll]]></dc:creator><pubDate>Sun, 04 Nov 2012 19:23:23 GMT</pubDate></item><item><title><![CDATA[Reply to Kommazahlen on Sun, 04 Nov 2012 19:24:00 GMT]]></title><description><![CDATA[<p>Ah sorry ich hab einen 3er vergessen:</p>
<pre><code class="language-cpp">double z1 = 1.333;
z1 *= 1.333;
cout &lt;&lt; z1 &lt;&lt; endl;
</code></pre>
<p>Hier wird 1.77689 geliefert, richtig wäre aber 1,776889 !</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2267372</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2267372</guid><dc:creator><![CDATA[reverser]]></dc:creator><pubDate>Sun, 04 Nov 2012 19:24:00 GMT</pubDate></item><item><title><![CDATA[Reply to Kommazahlen on Sun, 04 Nov 2012 19:25:15 GMT]]></title><description><![CDATA[<p>Das fällt dann unter Rundungsfehler.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2267374</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2267374</guid><dc:creator><![CDATA[dertroll]]></dc:creator><pubDate>Sun, 04 Nov 2012 19:25:15 GMT</pubDate></item><item><title><![CDATA[Reply to Kommazahlen on Sun, 04 Nov 2012 19:26:27 GMT]]></title><description><![CDATA[<p>Ja aber wie verhindert man so etwas.<br />
Übrigens: in Java gibt es hier keinen Fehler.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2267375</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2267375</guid><dc:creator><![CDATA[reverser]]></dc:creator><pubDate>Sun, 04 Nov 2012 19:26:27 GMT</pubDate></item><item><title><![CDATA[Reply to Kommazahlen on Sun, 04 Nov 2012 19:28:57 GMT]]></title><description><![CDATA[<p>Rundung ist schon der richtige Begriff, die findet nämlich bei der Ausgabe statt.<br />
Mach es so:</p>
<pre><code class="language-cpp">cout &lt;&lt; fixed &lt;&lt; z1 &lt;&lt; endl;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2267378</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2267378</guid><dc:creator><![CDATA[Athar]]></dc:creator><pubDate>Sun, 04 Nov 2012 19:28:57 GMT</pubDate></item><item><title><![CDATA[Reply to Kommazahlen on Sun, 04 Nov 2012 19:32:18 GMT]]></title><description><![CDATA[<p>Achso danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2267381</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2267381</guid><dc:creator><![CDATA[reverser]]></dc:creator><pubDate>Sun, 04 Nov 2012 19:32:18 GMT</pubDate></item><item><title><![CDATA[Reply to Kommazahlen on Sun, 04 Nov 2012 23:51:33 GMT]]></title><description><![CDATA[<p>Naja, Rundung findet praktisch überall statt ... sowohl beim rechnen mit floats ... als auch bei der konvertierung zwischen float &lt;-&gt; string (für ein/ausgabe).</p>
<p>Per default zeigt cout einem halt nur 6 signifikante Dezimalstellen an (oder so ähnlich). Das kann man mit precision ändern.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2267504</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2267504</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Sun, 04 Nov 2012 23:51:33 GMT</pubDate></item><item><title><![CDATA[Reply to Kommazahlen on Mon, 05 Nov 2012 19:07:57 GMT]]></title><description><![CDATA[<p>Aber was macht man wenn man nicht weiß wie viele Nachkommastellen die Zahl hat?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2267822</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2267822</guid><dc:creator><![CDATA[fenzls]]></dc:creator><pubDate>Mon, 05 Nov 2012 19:07:57 GMT</pubDate></item><item><title><![CDATA[Reply to Kommazahlen on Mon, 05 Nov 2012 19:10:00 GMT]]></title><description><![CDATA[<p>So genau ausgeben, wie mans braucht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2267824</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2267824</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Mon, 05 Nov 2012 19:10:00 GMT</pubDate></item></channel></rss>