<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Is D:s floating point handling too advanced?</title>
	<atom:link href="http://www.hans-eric.com/2007/08/23/is-floating-point-handling-too-advanced-in-d/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hans-eric.com/2007/08/23/is-floating-point-handling-too-advanced-in-d/</link>
	<description>Hans-Eric Grönlund on software development</description>
	<pubDate>Thu, 16 Oct 2008 04:30:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: renoX</title>
		<link>http://www.hans-eric.com/2007/08/23/is-floating-point-handling-too-advanced-in-d/#comment-22</link>
		<dc:creator>renoX</dc:creator>
		<pubDate>Sat, 01 Sep 2007 06:58:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.hans-eric.com/2007/08/23/is-floating-point-handling-too-advanced-in-d/#comment-22</guid>
		<description>About the 'someFieldVar.isnan' property, you're asking, something like that may work in the future, as Walter's have said in the future D improvements that a.f(...) will be equivalent to f(a ....)

So I would expect 'someFieldVar.isnan()' to work when this is implemented.</description>
		<content:encoded><![CDATA[<p>About the &#8217;someFieldVar.isnan&#8217; property, you&#8217;re asking, something like that may work in the future, as Walter&#8217;s have said in the future D improvements that a.f(&#8230;) will be equivalent to f(a &#8230;.)</p>
<p>So I would expect &#8217;someFieldVar.isnan()&#8217; to work when this is implemented.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: www.hans-eric.com &#187; Blog Archive &#187; Is IEE 754 too advanced?</title>
		<link>http://www.hans-eric.com/2007/08/23/is-floating-point-handling-too-advanced-in-d/#comment-6</link>
		<dc:creator>www.hans-eric.com &#187; Blog Archive &#187; Is IEE 754 too advanced?</dc:creator>
		<pubDate>Fri, 24 Aug 2007 11:50:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.hans-eric.com/2007/08/23/is-floating-point-handling-too-advanced-in-d/#comment-6</guid>
		<description>[...] my previous post I&#8217;m afraid I exposed my inexperience in the world of floating point programming. As many [...]</description>
		<content:encoded><![CDATA[<p>[...] my previous post I&#8217;m afraid I exposed my inexperience in the world of floating point programming. As many [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans-Eric</title>
		<link>http://www.hans-eric.com/2007/08/23/is-floating-point-handling-too-advanced-in-d/#comment-5</link>
		<dc:creator>Hans-Eric</dc:creator>
		<pubDate>Fri, 24 Aug 2007 06:57:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.hans-eric.com/2007/08/23/is-floating-point-handling-too-advanced-in-d/#comment-5</guid>
		<description>Thanks Daniel, obviously I haven't had much experience with floating point arithmetics (despite nearly two decades in the business). I can see the logic that works behind this, although to me it still feels unintuitive. I will not fight it anymore though, I shall go with the flow :-).</description>
		<content:encoded><![CDATA[<p>Thanks Daniel, obviously I haven&#8217;t had much experience with floating point arithmetics (despite nearly two decades in the business). I can see the logic that works behind this, although to me it still feels unintuitive. I will not fight it anymore though, I shall go with the flow :-).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.hans-eric.com/2007/08/23/is-floating-point-handling-too-advanced-in-d/#comment-4</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Fri, 24 Aug 2007 03:14:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.hans-eric.com/2007/08/23/is-floating-point-handling-too-advanced-in-d/#comment-4</guid>
		<description>The thing to keep in mind here is that this is how floating point is supposed to work.  NaN is explicitly supposed to compare as false to everything else including itself using standard operators.

If you were to use C or C++, they should have the exact same behaviour!  The floating point comparisons are done by the CPU, not by the programming language itself, so it's a little unfair to blame D for this.

The way I look for NaN is to use the `x != x` idiom; saves me having to remember those weird extra operators.  If you want to assert that a real has been initialised, use `assert(x==x);` which is true unless x is NaN.

IEEE 754 is a complex but necessary part of programming with real numbers.  It might be worth reading up on it so you know about all the various corner-cases (such as `-0` being different from `0-0`.)</description>
		<content:encoded><![CDATA[<p>The thing to keep in mind here is that this is how floating point is supposed to work.  NaN is explicitly supposed to compare as false to everything else including itself using standard operators.</p>
<p>If you were to use C or C++, they should have the exact same behaviour!  The floating point comparisons are done by the CPU, not by the programming language itself, so it&#8217;s a little unfair to blame D for this.</p>
<p>The way I look for NaN is to use the `x != x` idiom; saves me having to remember those weird extra operators.  If you want to assert that a real has been initialised, use `assert(x==x);` which is true unless x is NaN.</p>
<p>IEEE 754 is a complex but necessary part of programming with real numbers.  It might be worth reading up on it so you know about all the various corner-cases (such as `-0` being different from `0-0`.)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.282 seconds -->
