<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/232" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2006-02-06T12:24:25+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/232</id>

		<entry>
		<author><name><![CDATA[gino]]></name></author>
		<updated>2006-02-06T12:24:25+00:00</updated>

		<published>2006-02-06T12:24:25+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=681#p681</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=681#p681"/>
		<title type="html"><![CDATA[Gino's Book - Robustness section]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=681#p681"><![CDATA[
<blockquote class="uncited"><div><br>Using exact arithmetic sub would be 4e-8 but with floating-point arithmetic it is quite far from it ( see above ). So, I guess that this turned out to be a catastrophic cancellation situation because both results ( from floating-point and exact arithmetic ) don't have any digits in common, therefore, the relative error is huge ( see above ), am I right ?<br><br>Thanks!</div></blockquote>Correct. Note that IEEE 754 single-precision numbers have only 24 accurate bits (= +/- 7 decimal digits). In reality things may not be that bad (on Intel at least), since temporary values are often evaluated and stored at higher precisions (IA-32 float registers have 64-bit mantissas).<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=4">gino</a> — Mon Feb 06, 2006 12:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[omicron]]></name></author>
		<updated>2006-02-03T18:38:38+00:00</updated>

		<published>2006-02-03T18:38:38+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=679#p679</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=679#p679"/>
		<title type="html"><![CDATA[Gino's Book - Robustness section]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=679#p679"><![CDATA[
Well, first off, thank you both for your help! <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><br><br>So, I wrote this little program to test cancellation when subtracting two nearly equal values.<div class="codebox"><p>Code: </p><pre><code>// Both delta0 and delta1 suffer from rounding// errors because they're not representable in IEEE-754float delta0 = 0.432343547394f;float delta1 = 0.432343587394f;// Relative errors from both delta0 and delta1// are bounded by machine epsilonfloat delta0_rel_error = FLT_EPSILON;float delta1_rel_error = FLT_EPSILON;float add = delta1 + delta0;float sub = delta1 - delta0;float mul = delta1 * delta0;float add_rel_error = ( fabs( delta0 * delta0_rel_error ) + fabs( delta1 * delta1_rel_error ) ) / ( fabs( add ) ) + FLT_EPSILON;float sub_rel_error = ( fabs( delta0 * delta0_rel_error ) + fabs( delta1 * delta1_rel_error ) ) / ( fabs( sub ) ) + FLT_EPSILON;float mul_rel_error = fabs( delta0_rel_error ) + fabs( delta1_rel_error ) + FLT_EPSILON;</code></pre></div>The results are:<br><br>add = 0.86468714475631714;<br>sub = 5.96046644775390625e-8;<br>mul = 0.18692097067832947;<br><br>add_rel_error = 2.384185791015625e-7;<br>sub_rel_error = 1.7293744087219238;<br>mul_rel_error = 3.5763786865234375e-7;<br><br>Using exact arithmetic sub would be 4e-8 but with floating-point arithmetic it is quite far from it ( see above ). So, I guess that this turned out to be a catastrophic cancellation situation because both results ( from floating-point and exact arithmetic ) don't have any digits in common, therefore, the relative error is huge ( see above ), am I right ?<br><br>Thanks!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=408">omicron</a> — Fri Feb 03, 2006 6:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gino]]></name></author>
		<updated>2006-02-03T16:20:25+00:00</updated>

		<published>2006-02-03T16:20:25+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=678#p678</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=678#p678"/>
		<title type="html"><![CDATA[Re: Gino's Book - Robustness section]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=678#p678"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>So, from page 59 I'm not understanding what Gino is trying to explain in the phrase that starts with "Assume".</div></blockquote>Hope that helps to clarify what's meant.</div></blockquote>Well put. Thanks Christer.<br><br>The only thing I'd like to add is that computations would still classify as 'fairly accurate' if |ei| &lt;= C * u for C greater than 1. For example,  for errors ei of 100 * u, the term e1 * e2 would still not be anywhere near the machine epsilon of single-precision floats and can be safely ignored in your analysis.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=4">gino</a> — Fri Feb 03, 2006 4:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Christer Ericson]]></name></author>
		<updated>2006-02-03T07:55:06+00:00</updated>

		<published>2006-02-03T07:55:06+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=677#p677</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=677#p677"/>
		<title type="html"><![CDATA[Re: Gino's Book - Robustness section]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=677#p677"><![CDATA[
<blockquote class="uncited"><div>So, from page 59 I'm not understanding what Gino is trying to explain in the phrase that starts with "Assume".</div></blockquote>I'm not Gino, but perhaps I can explain anyway.  Let's start by nothing that a typical floating point operation 'op' introduces an error along the lines of:<br><br>fl(a op b) = (a op b)(1+e) where |e| &lt;= u (where u is the machine epsilon).<br><br>Now consider the computation of e.g. a*b*c in floating point.  This is equivalent to [((a*b)*(1+e1))*c]*(1+e2) = a*b*c*(1+e1)*(1+e2) = a*b*c*(1+e1+e2+e1*e2). This is just straightforward manipulation so far.<br><br>At this point, with |ei| &lt;= u, we can simply say that 1+e1+e2+e1*e2 = 1+e1+e2+O(u^2) and we then promptly ignore the O(u^2) term because it is so small that it (typically) won't affect the result. That leaves us with:<br><br>a*b*c*(1+e1+e2)<br><br>as the value computed for the floating-point expression a*b*c. Gino's sentence on page 59 is in reference to dropping this O(u^2) term that I talked about above.<br><br>Hope that helps to clarify what's meant.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=8">Christer Ericson</a> — Fri Feb 03, 2006 7:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[omicron]]></name></author>
		<updated>2006-02-02T18:24:19+00:00</updated>

		<published>2006-02-02T18:24:19+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=676#p676</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=676#p676"/>
		<title type="html"><![CDATA[Gino's Book - Robustness section]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=676#p676"><![CDATA[
Hi,<br><br>This question is mainly directed to Gino van den Bergen as it is a little doubt from his book. However, anyone able to help is very welcome. <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>So, from page 59 I'm not understanding what Gino is trying to explain in the phrase that starts with "Assume". It's located right in the bottom of the page just before he finds the upper bound for the relative error for approximation of gamma. I don't want to break any copyright law, else, I would have copied it over here. <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> There's no need to explain what's below the upper bound inequality.<br><br>Thank you!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=408">omicron</a> — Thu Feb 02, 2006 6:24 pm</p><hr />
]]></content>
	</entry>
	</feed>
