<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dasz.at - Benutzbare Technologie &#187; SQL</title>
	<atom:link href="http://dasz.at/index.php/category/tech/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://dasz.at</link>
	<description>Benutzbare Technologie</description>
	<lastBuildDate>Wed, 07 Jul 2010 06:54:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>MSSQL doesn&#8217;t (completely) support IEEE754 floating points</title>
		<link>http://dasz.at/index.php/2009/12/sql-and-ieee754-support-for-nan-infinity/</link>
		<comments>http://dasz.at/index.php/2009/12/sql-and-ieee754-support-for-nan-infinity/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 11:00:44 +0000</pubDate>
		<dc:creator>David Schmitt</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://dasz.at/index.php/2009/12/sql-and-ieee754-support-for-nan-infinity/</guid>
		<description><![CDATA[After looking for quite a while (it is unbelievable, no?) I have to accept that Microsoft&#8217;s SQL Server 2000, 2005 and 2008 do not fully support IEEE-754 floating point numbers. Specifically NaN (Not-a-Number) and +/- Infinity are not allowed. While the 2000 Server seemingly allows such values to be inserted, but breaks badly afterwards, the [...]]]></description>
			<content:encoded><![CDATA[<p>After looking for quite a while (it is unbelievable, no?) I have to accept that Microsoft&#8217;s SQL Server 2000, 2005 and 2008 do not fully support IEEE-754 floating point numbers. Specifically NaN (Not-a-Number) and +/- Infinity are not allowed. While the 2000 Server seemingly allows such values to be inserted, but breaks badly afterwards, the newer versions disallow inserting such values. Here is the <a href="http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=239674">MS Connect article requesting the feature</a>. There is also the documentation about <a href="http://msdn.microsoft.com/en-us/library/ms187912.aspx">float data</a> and a read-between-the-lines hint in the documentation for <a href="http://msdn.microsoft.com/en-us/library/ms172002.aspx">XPath numbers</a>. The article describing floats is very circumspect about this:</p>
<blockquote><p>The behavior of float and real <strong>follows</strong> the IEEE 754 specification on approximate numeric data types.</p></blockquote>
<p> [emphasis mine]</p>
<p>The <a href="http://msdn.microsoft.com/en-us/library/ms172002.aspx">XPath article</a> states it clearly:</p>
<blockquote><p>However, float(53) is not exactly IEEE 754. For example, neither NaN (Not-a-Number) nor infinity is used.</p></blockquote>
<p>.</p>
<p>For completeness, here&#8217;s a little review about other DMBS&#8217; support for NaNs and Infinity:</p>
<ul>
<li>MySQL does what it always does if it encounters &#8220;strange&#8221; values: according to <a href="http://dev.mysql.com/doc/refman/5.5/en/numeric-types.html">this comment by Carl Fischer</a> (bottom of the page), MySQL transforms the special values quietly to zero when writing them into the table.</li>
<li><a href="http://www.oracle-base.com/articles/10g/PlsqlEnhancements10g.php#new_ieee_floating_point_types">Oracle (starting at version 10g) supports all IEEE754 single and double precision values</a> and provides constants for NaN and Infinity in its SQL implementation. This is implemented using the BINARY_FLOAT and BINARY_DOUBLE data types.</li>
<li><a href="http://www.postgresql.org/docs/8.4/interactive/datatype-numeric.html#DATATYPE-FLOAT">PostgreSQL</a> uses the underlying system&#8217;s float representation and allows input of NaN and infinite values.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dasz.at/index.php/2009/12/sql-and-ieee754-support-for-nan-infinity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
