<?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>Blog &#187; double</title>
	<atom:link href="http://www.adamcrume.com/blog/archive/tag/double/feed" rel="self" type="application/rss+xml" />
	<link>http://www.adamcrume.com/blog</link>
	<description></description>
	<lastBuildDate>Thu, 12 Jan 2012 15:54:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Double.equals pitfalls</title>
		<link>http://www.adamcrume.com/blog/archive/2009/09/11/doubleequals-pitfalls</link>
		<comments>http://www.adamcrume.com/blog/archive/2009/09/11/doubleequals-pitfalls#comments</comments>
		<pubDate>Fri, 11 Sep 2009 19:12:35 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[double]]></category>
		<category><![CDATA[equals]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://localhost/blog/?p=22</guid>
		<description><![CDATA[It turns out that Double.equals is not always the same as == with two double primitives. Case in point:
double a = Double.NaN;
System.out.println(a == a);
Double b = new Double(a);
System.out.println(b.equals(b));
This code will print out false and true.
What&#8217;s going on? Basically, if you look at the Javadoc for the equals method, it says that &#8220;two double values are [...]]]></description>
		<wfw:commentRss>http://www.adamcrume.com/blog/archive/2009/09/11/doubleequals-pitfalls/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

