<?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[float Frage]]></title><description><![CDATA[<p>Hey</p>
<p>Wie kann ich bei einer float Zahl prüfen, ob die erste Nachkommastelle größer oder kleiner 0,5 ist?</p>
<p>z.b.: 19864.035 -&gt; ist kleiner<br />
3435363.55 -&gt; ist größer</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/204454/float-frage</link><generator>RSS for Node</generator><lastBuildDate>Thu, 08 Oct 2026 14:43:27 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/204454.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 03 Feb 2008 16:04:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to float Frage on Sun, 03 Feb 2008 16:04:14 GMT]]></title><description><![CDATA[<p>Hey</p>
<p>Wie kann ich bei einer float Zahl prüfen, ob die erste Nachkommastelle größer oder kleiner 0,5 ist?</p>
<p>z.b.: 19864.035 -&gt; ist kleiner<br />
3435363.55 -&gt; ist größer</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1448561</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1448561</guid><dc:creator><![CDATA[Hiko]]></dc:creator><pubDate>Sun, 03 Feb 2008 16:04:14 GMT</pubDate></item><item><title><![CDATA[Reply to float Frage on Sun, 03 Feb 2008 16:11:51 GMT]]></title><description><![CDATA[<p>(int)floatVar==(int)(floatVar+0.5f) <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /> kleiner</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1448570</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1448570</guid><dc:creator><![CDATA[inetwa]]></dc:creator><pubDate>Sun, 03 Feb 2008 16:11:51 GMT</pubDate></item><item><title><![CDATA[Reply to float Frage on Sun, 03 Feb 2008 16:15:35 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">double Zahl = 19864.035;
double GanzzahligerTeil;

if(0.5 &gt; modf(Zahl,&amp;GanzzahligerTeil)) // oder halt &lt;
{
//...
}
else
{
//...
};

Das ist schöner!  :p
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1448573</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1448573</guid><dc:creator><![CDATA[Programmierer]]></dc:creator><pubDate>Sun, 03 Feb 2008 16:15:35 GMT</pubDate></item></channel></rss>