<?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[String nach Double umwandeln ohne Runden]]></title><description><![CDATA[<p>gibt es für strings ähnliches wie für float, int und double sowas hier std::cout &lt;&lt; setprecision(14)???</p>
<p>problem in kleinem beispiel:</p>
<pre><code class="language-cpp">double Id = 17530457180; 

//Id in string KartenId umwandeln
ostringstream outStream;
outStream &lt;&lt; Id;
KartenId = outStream.str();

Ausgabe:

KartenId: 17530500000 &lt;--- viel zu ungenau  :-1:
</code></pre>
<p>mfg speedy</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/171395/string-nach-double-umwandeln-ohne-runden</link><generator>RSS for Node</generator><lastBuildDate>Thu, 17 Sep 2026 10:34:41 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/171395.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 25 Jan 2007 03:29:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to String nach Double umwandeln ohne Runden on Thu, 25 Jan 2007 03:29:39 GMT]]></title><description><![CDATA[<p>gibt es für strings ähnliches wie für float, int und double sowas hier std::cout &lt;&lt; setprecision(14)???</p>
<p>problem in kleinem beispiel:</p>
<pre><code class="language-cpp">double Id = 17530457180; 

//Id in string KartenId umwandeln
ostringstream outStream;
outStream &lt;&lt; Id;
KartenId = outStream.str();

Ausgabe:

KartenId: 17530500000 &lt;--- viel zu ungenau  :-1:
</code></pre>
<p>mfg speedy</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1216548</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1216548</guid><dc:creator><![CDATA[speedy_is_here]]></dc:creator><pubDate>Thu, 25 Jan 2007 03:29:39 GMT</pubDate></item><item><title><![CDATA[Reply to String nach Double umwandeln ohne Runden on Thu, 25 Jan 2007 07:05:11 GMT]]></title><description><![CDATA[<p>Auch double-Werte haben nur eine begrenzte Genauigkeit von (afaik) 6 bis 8 signifikanten Stellen. Alles was darüber hinausgeht, kannst du nicht mehr exakt in einer double-Variablen unterbringen, da benötigst du schon Spezialbibliotheken für übergroße Zahlen (z.B. GMP) oder du verarbeitest die IDs als Strings.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1216569</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1216569</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Thu, 25 Jan 2007 07:05:11 GMT</pubDate></item><item><title><![CDATA[Reply to String nach Double umwandeln ohne Runden on Thu, 25 Jan 2007 07:29:13 GMT]]></title><description><![CDATA[<p>double hat 15-16 signifikante Stellen, sollte hier also reichen. single hat nur 7-8.</p>
<pre><code>double Id = 17530457180;

//Id in string KartenId umwandeln
ostringstream outStream;
[b]outStream.precision(15);[/b]
outStream &lt;&lt; Id;
string KartenId = outStream.str();
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1216581</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1216581</guid><dc:creator><![CDATA[Morris Szyslak]]></dc:creator><pubDate>Thu, 25 Jan 2007 07:29:13 GMT</pubDate></item><item><title><![CDATA[Reply to String nach Double umwandeln ohne Runden on Thu, 25 Jan 2007 12:14:59 GMT]]></title><description><![CDATA[<p>Perfekt! Danke</p>
<p>MfG speedy</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1216796</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1216796</guid><dc:creator><![CDATA[speedy_is_here]]></dc:creator><pubDate>Thu, 25 Jan 2007 12:14:59 GMT</pubDate></item></channel></rss>