<?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 und Kommastellen]]></title><description><![CDATA[<p>Hallo Gemeinde ich habe hier beim rechnen vermutlich ein Rundungsproblem.</p>
<p>Taschenrechner: der Sinus aus 45 ergibt: 0,707106781 gerundet 0,7</p>
<pre><code class="language-cpp">float y = sin(45);
</code></pre>
<p>Da kommt 0.850904 das ist aber nichtmal ansatzweise richtig. Kann mir jemand sagen was da falsch läuft?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/221378/float-und-kommastellen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 06 Oct 2026 08:12:23 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/221378.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 28 Aug 2008 12:36:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to float und Kommastellen on Thu, 28 Aug 2008 12:36:06 GMT]]></title><description><![CDATA[<p>Hallo Gemeinde ich habe hier beim rechnen vermutlich ein Rundungsproblem.</p>
<p>Taschenrechner: der Sinus aus 45 ergibt: 0,707106781 gerundet 0,7</p>
<pre><code class="language-cpp">float y = sin(45);
</code></pre>
<p>Da kommt 0.850904 das ist aber nichtmal ansatzweise richtig. Kann mir jemand sagen was da falsch läuft?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1572925</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1572925</guid><dc:creator><![CDATA[jd]]></dc:creator><pubDate>Thu, 28 Aug 2008 12:36:06 GMT</pubDate></item><item><title><![CDATA[Reply to float und Kommastellen on Thu, 28 Aug 2008 12:46:58 GMT]]></title><description><![CDATA[<p>Du musst vorher deine Gradzahl in Radian umwandeln:</p>
<pre><code class="language-cpp">sinf( 45.0f * PI / 180.0f  )
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1572933</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1572933</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Thu, 28 Aug 2008 12:46:58 GMT</pubDate></item><item><title><![CDATA[Reply to float und Kommastellen on Thu, 28 Aug 2008 14:30:08 GMT]]></title><description><![CDATA[<p>0.85 ist richtig...</p>
<p>nur halt eben als Radiant wert also das Bogenmaß</p>
<p>entweder wandelst du den eingehenden wert in radiant um doer den ausgehenden</p>
<p>irgendwas mit 180 * pi oder so</p>
<p>wie mein vorredner sagte</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1573059</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1573059</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Thu, 28 Aug 2008 14:30:08 GMT</pubDate></item><item><title><![CDATA[Reply to float und Kommastellen on Thu, 28 Aug 2008 14:31:43 GMT]]></title><description><![CDATA[<p>M_PI müsste das Define aus &lt;cmath&gt; sein.</p>
<p>Von rad zu deg: / M_PI * 180<br />
Von deg zu rad: * M_PI / 180</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1573061</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1573061</guid><dc:creator><![CDATA[Fellhuhn]]></dc:creator><pubDate>Thu, 28 Aug 2008 14:31:43 GMT</pubDate></item><item><title><![CDATA[Reply to float und Kommastellen on Thu, 28 Aug 2008 15:00:35 GMT]]></title><description><![CDATA[<p>Skym0sh0 schrieb:</p>
<blockquote>
<p>0.85 ist richtig...</p>
<p>nur halt eben als Radiant wert also das Bogenmaß</p>
<p>entweder wandelst du den eingehenden wert in radiant um doer den ausgehenden</p>
<p>irgendwas mit 180 * pi oder so</p>
<p>wie mein vorredner sagte</p>
</blockquote>
<p>Das stimmt so aber nicht. Die sin Funktion erwartet Werte in radiant.<br />
Der Funktion Grad-Werte zu übergeben und das Ergebnis nachträglich umformen ergibt definitiv falsche Werte!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1573086</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1573086</guid><dc:creator><![CDATA[MiP]]></dc:creator><pubDate>Thu, 28 Aug 2008 15:00:35 GMT</pubDate></item></channel></rss>