<?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[Exception istZahl?]]></title><description><![CDATA[<p>hallo<br />
ich weiss nicht wie ich herrausfinden kann ob eine zuweisung durch eine Formel</p>
<pre><code class="language-cpp">double i= irgendeine Formel
</code></pre>
<p>mal nicht eine Zahl ergibt oder vielleicht out_of_range ist.<br />
jenachdem welche parameter die Formel bekommt kommt manchmal eine zahl raus die ungefähr so aussieht -1#N (irgendwie so, undefiniert halt)<br />
jetzt möchte ich eine Ausnahme werfen, aber wie stelle ich fest dass es sich um keine richtige zahl mehr handelt? mit if anweisungen klappts nicht.<br />
viele grüsse<br />
Xadine</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/197070/exception-istzahl</link><generator>RSS for Node</generator><lastBuildDate>Thu, 01 Oct 2026 00:03:45 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/197070.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 06 Nov 2007 11:15:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Exception istZahl? on Tue, 06 Nov 2007 11:15:28 GMT]]></title><description><![CDATA[<p>hallo<br />
ich weiss nicht wie ich herrausfinden kann ob eine zuweisung durch eine Formel</p>
<pre><code class="language-cpp">double i= irgendeine Formel
</code></pre>
<p>mal nicht eine Zahl ergibt oder vielleicht out_of_range ist.<br />
jenachdem welche parameter die Formel bekommt kommt manchmal eine zahl raus die ungefähr so aussieht -1#N (irgendwie so, undefiniert halt)<br />
jetzt möchte ich eine Ausnahme werfen, aber wie stelle ich fest dass es sich um keine richtige zahl mehr handelt? mit if anweisungen klappts nicht.<br />
viele grüsse<br />
Xadine</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1398547</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1398547</guid><dc:creator><![CDATA[Xadine]]></dc:creator><pubDate>Tue, 06 Nov 2007 11:15:28 GMT</pubDate></item><item><title><![CDATA[Reply to Exception istZahl? on Tue, 06 Nov 2007 11:42:04 GMT]]></title><description><![CDATA[<p>Ich weiss nicht ob die Funktion immer so heisst, aber bei MSVC gibts _finite:</p>
<pre><code class="language-cpp">double d = ...;
if (_finite(d))
{
    // d ist eine normale Zahl
}
else
{
    // d ist NAN/+INF/-INF/...
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1398562</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1398562</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Tue, 06 Nov 2007 11:42:04 GMT</pubDate></item><item><title><![CDATA[Reply to Exception istZahl? on Tue, 06 Nov 2007 13:43:39 GMT]]></title><description><![CDATA[<p>Es gibt auch die Funktion isnan(). Aber diese wird nicht von allen Compilern unterstützt. Glaube der msvc kennt dafür _isnan().</p>
<p>Einfach mal ausprobieren obs funktioniert...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1398658</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1398658</guid><dc:creator><![CDATA[Tobias W]]></dc:creator><pubDate>Tue, 06 Nov 2007 13:43:39 GMT</pubDate></item><item><title><![CDATA[Reply to Exception istZahl? on Tue, 06 Nov 2007 15:13:58 GMT]]></title><description><![CDATA[<p>jo super _finite funzt,<br />
danke nochmal</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1398738</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1398738</guid><dc:creator><![CDATA[Xadinee]]></dc:creator><pubDate>Tue, 06 Nov 2007 15:13:58 GMT</pubDate></item><item><title><![CDATA[Reply to Exception istZahl? on Tue, 06 Nov 2007 15:54:54 GMT]]></title><description><![CDATA[<p>Tobias W schrieb:</p>
<blockquote>
<p>Glaube der msvc kennt dafür _isnan().</p>
</blockquote>
<p>Genau, bei MSVC heisst die _isnan. Unterschied !_finite(x) &lt;-&gt; _isnan(x): _isnan(+/-INF) ist false, !_finite(+/-INF) ist true.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1398773</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1398773</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Tue, 06 Nov 2007 15:54:54 GMT</pubDate></item></channel></rss>