<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Floating Point Determinism</title>
	<atom:link href="http://gafferongames.com/networking-for-game-programmers/floating-point-determinism/feed/" rel="self" type="application/rss+xml" />
	<link>http://gafferongames.com</link>
	<description>Glenn Fiedler&#039;s Game Development Articles and Tutorials</description>
	<lastBuildDate>Wed, 02 May 2012 22:39:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Imran Shafiq</title>
		<link>http://gafferongames.com/networking-for-game-programmers/floating-point-determinism/#comment-47664</link>
		<dc:creator>Imran Shafiq</dc:creator>
		<pubDate>Wed, 02 May 2012 22:39:14 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.com/?page_id=1351#comment-47664</guid>
		<description>I used farseer physics engine for my 2D dynamic online multiplayer game &quot;Air Soccer Fever&quot; on WP7 and I had to do alot of hacks to sync physics on two WP7 devices playing a match. Without gamestate syncs, the game would diverge very soon because the game is all about collisions of players and ball. 

So who is going to write the first integer based 2d &amp; 3d physics engine? :)</description>
		<content:encoded><![CDATA[<p>I used farseer physics engine for my 2D dynamic online multiplayer game &#8220;Air Soccer Fever&#8221; on WP7 and I had to do alot of hacks to sync physics on two WP7 devices playing a match. Without gamestate syncs, the game would diverge very soon because the game is all about collisions of players and ball. </p>
<p>So who is going to write the first integer based 2d &amp; 3d physics engine? <img src='http://gafferongames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RSG</title>
		<link>http://gafferongames.com/networking-for-game-programmers/floating-point-determinism/#comment-35516</link>
		<dc:creator>RSG</dc:creator>
		<pubDate>Mon, 23 Jan 2012 14:26:51 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.com/?page_id=1351#comment-35516</guid>
		<description>If you know bounds on the approximate magnitude of all the values before hand, you can apply shifts to avoid overflow (or use C++ templates to make it automatic). I&#039;ve made a physics intensive fixed point game in C++ before, and it works pretty well. The main problem with this approach is that the code is no longer generic, so it&#039;s only useful if you know exactly what you&#039;ll be doing ahead of time.</description>
		<content:encoded><![CDATA[<p>If you know bounds on the approximate magnitude of all the values before hand, you can apply shifts to avoid overflow (or use C++ templates to make it automatic). I&#8217;ve made a physics intensive fixed point game in C++ before, and it works pretty well. The main problem with this approach is that the code is no longer generic, so it&#8217;s only useful if you know exactly what you&#8217;ll be doing ahead of time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/networking-for-game-programmers/floating-point-determinism/#comment-32080</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Sun, 01 Jan 2012 01:41:02 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.com/?page_id=1351#comment-32080</guid>
		<description>Yes it is possible, but consider the situation where the corrective states are too large to send. Then you go for 100% determinism. cheers</description>
		<content:encoded><![CDATA[<p>Yes it is possible, but consider the situation where the corrective states are too large to send. Then you go for 100% determinism. cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://gafferongames.com/networking-for-game-programmers/floating-point-determinism/#comment-32051</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Sat, 31 Dec 2011 21:29:41 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.com/?page_id=1351#comment-32051</guid>
		<description>Although the differences exist, would it be possible to use this method and send corrective states over time so that a client could correct itself, or are the differences likely to result in large divergence quickly?</description>
		<content:encoded><![CDATA[<p>Although the differences exist, would it be possible to use this method and send corrective states over time so that a client could correct itself, or are the differences likely to result in large divergence quickly?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How are deterministic games possible in the face of floating-point non-determinism? &#124; Q&#38;A System</title>
		<link>http://gafferongames.com/networking-for-game-programmers/floating-point-determinism/#comment-30921</link>
		<dc:creator>How are deterministic games possible in the face of floating-point non-determinism? &#124; Q&#38;A System</dc:creator>
		<pubDate>Sun, 25 Dec 2011 15:54:18 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.com/?page_id=1351#comment-30921</guid>
		<description>[...] offered that floating-point calculations are non-deterministic in between machines, and even in between numerous compilations in a comparable plan within a [...]</description>
		<content:encoded><![CDATA[<p>[...] offered that floating-point calculations are non-deterministic in between machines, and even in between numerous compilations in a comparable plan within a [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/networking-for-game-programmers/floating-point-determinism/#comment-27911</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Fri, 09 Dec 2011 04:27:26 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.com/?page_id=1351#comment-27911</guid>
		<description>Huzzah!</description>
		<content:encoded><![CDATA[<p>Huzzah!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Jurney</title>
		<link>http://gafferongames.com/networking-for-game-programmers/floating-point-determinism/#comment-27845</link>
		<dc:creator>Chris Jurney</dc:creator>
		<pubDate>Thu, 08 Dec 2011 19:04:58 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.com/?page_id=1351#comment-27845</guid>
		<description>It wouldn&#039;t help for determinism to determine the largest accurate mantissa on various architectures.  A disagreement in a lower bit can propogate to a disagreement in higher bits if the number lands near the edge of rounding.

It&#039;s probably time to stop depending on floats to be deterministic on PCs, though.  No new features on 64 bit CPUs are deterministic across models / manufacturers.  All hail the rise of cross platform deterministic int based game and physics engines!</description>
		<content:encoded><![CDATA[<p>It wouldn&#8217;t help for determinism to determine the largest accurate mantissa on various architectures.  A disagreement in a lower bit can propogate to a disagreement in higher bits if the number lands near the edge of rounding.</p>
<p>It&#8217;s probably time to stop depending on floats to be deterministic on PCs, though.  No new features on 64 bit CPUs are deterministic across models / manufacturers.  All hail the rise of cross platform deterministic int based game and physics engines!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Misha</title>
		<link>http://gafferongames.com/networking-for-game-programmers/floating-point-determinism/#comment-21549</link>
		<dc:creator>Misha</dc:creator>
		<pubDate>Tue, 11 Oct 2011 18:46:28 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.com/?page_id=1351#comment-21549</guid>
		<description>I wonder if there is a way to determine the largest accurate mantissa for common architectures after performing a single float operation? I did a quick search on ISI web of science and didn&#039;t find anything. Somebody should really do an investigation!</description>
		<content:encoded><![CDATA[<p>I wonder if there is a way to determine the largest accurate mantissa for common architectures after performing a single float operation? I did a quick search on ISI web of science and didn&#8217;t find anything. Somebody should really do an investigation!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Jurney</title>
		<link>http://gafferongames.com/networking-for-game-programmers/floating-point-determinism/#comment-17671</link>
		<dc:creator>Chris Jurney</dc:creator>
		<pubDate>Fri, 19 Aug 2011 21:43:56 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.com/?page_id=1351#comment-17671</guid>
		<description>SSE float ops are not deterministic because the standard specifies a minimum error, not a specific error for some operations like reciprocal.  You need to call _set_SSE2_enable(0) at startup on all your threads along with your _controlfp calls.

Multithreading won&#039;t have any affect on the order of operations for floats.  The compiler decides on that ordering at build time, so as long as all threads are running the same code, it won&#039;t matter.  What will matter is the ordering of results when you merge results, and that can break if you split work, and don&#039;t merge it back together based on a fully deterministic ordering.</description>
		<content:encoded><![CDATA[<p>SSE float ops are not deterministic because the standard specifies a minimum error, not a specific error for some operations like reciprocal.  You need to call _set_SSE2_enable(0) at startup on all your threads along with your _controlfp calls.</p>
<p>Multithreading won&#8217;t have any affect on the order of operations for floats.  The compiler decides on that ordering at build time, so as long as all threads are running the same code, it won&#8217;t matter.  What will matter is the ordering of results when you merge results, and that can break if you split work, and don&#8217;t merge it back together based on a fully deterministic ordering.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hamid Mushtaq</title>
		<link>http://gafferongames.com/networking-for-game-programmers/floating-point-determinism/#comment-16740</link>
		<dc:creator>Hamid Mushtaq</dc:creator>
		<pubDate>Tue, 09 Aug 2011 13:49:50 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.com/?page_id=1351#comment-16740</guid>
		<description>As far as effect of floating point calculations on multithreaded programs is concerned, it is not deterministic, due to the reason that it is neither associative nor distributive, its only commutative. So for example, a + ( b + c ) is not equal to ( a + b ) + c. 

Therefore if different threads are adding to sums by acquiring a lock, you need to make sure that all replicas acquire the locks in the same order or else the execution will diverge.</description>
		<content:encoded><![CDATA[<p>As far as effect of floating point calculations on multithreaded programs is concerned, it is not deterministic, due to the reason that it is neither associative nor distributive, its only commutative. So for example, a + ( b + c ) is not equal to ( a + b ) + c. </p>
<p>Therefore if different threads are adding to sums by acquiring a lock, you need to make sure that all replicas acquire the locks in the same order or else the execution will diverge.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.397 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-03 08:00:03 -->

