<?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>approximation - Base Six</title>
	<atom:link href="https://base6.com/tag/approximation/feed/" rel="self" type="application/rss+xml" />
	<link>https://base6.com/</link>
	<description>James Furness&#039;s blog</description>
	<lastBuildDate>Fri, 25 Jun 2010 07:08:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.3.1</generator>
	<item>
		<title>Calculating floating point epsilon/precision in Java</title>
		<link>https://base6.com/2010/06/24/calculating-floating-point-epsilonprecision-in-java/</link>
		
		<dc:creator><![CDATA[James Furness]]></dc:creator>
		<pubDate>Thu, 24 Jun 2010 10:25:44 +0000</pubDate>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[approximation]]></category>
		<category><![CDATA[epsilon]]></category>
		<category><![CDATA[floating point arithmetic]]></category>
		<category><![CDATA[machine representation]]></category>
		<guid isPermaLink="false">https://base6.com/?p=96</guid>

					<description><![CDATA[<p>Floating point arithmetic/rounding can be somewhat painful, made worse by the fact that the epsilon (error) in the machine representation of floating point varies depending on the exponent (i.e. how large/small the number being represented is): Normalized numbers when Base = 2, Precision = 3, Exponents = -1 to 2 [Goldberg91] A very comprehensive paper [&#8230;]</p>
<p>The post <a href="https://base6.com/2010/06/24/calculating-floating-point-epsilonprecision-in-java/">Calculating floating point epsilon/precision in Java</a> first appeared on <a href="https://base6.com/">Base Six</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Floating point arithmetic/rounding can be somewhat painful, made worse by the fact that the epsilon (error) in the machine representation of floating point varies depending on the exponent (i.e. how large/small the number being represented is):</p>
<div id="attachment_102" class="wp-caption aligncenter" style="width: 545px"><img decoding="async" class="size-full wp-image-102" title="Normalized numbers when Base = 2, Precision = 3, Exponents = -1 to 2" src="https://base6.com/files/2010/06/ncg_goldberg251.gif" alt="" width="535" height="62" /></p>
<p class="wp-caption-text">Normalized numbers when Base = 2, Precision = 3, Exponents = -1 to 2 [<a href="http://docs.sun.com/source/806-3568/ncg_goldberg.html">Goldberg91</a>]</p>
</div>
<p>A very comprehensive paper (from which the above image is taken) is available <a href="http://docs.sun.com/source/806-3568/ncg_goldberg.html">here</a>. In previous teams we have implemented our own functions to derive an approximation of the epsilon from the number to be represented, however I discovered recently to my surprise that such a function was added to Java in 1.5: <a href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#ulp%28double%29">Math.ulp</a>!</p><p>The post <a href="https://base6.com/2010/06/24/calculating-floating-point-epsilonprecision-in-java/">Calculating floating point epsilon/precision in Java</a> first appeared on <a href="https://base6.com/">Base Six</a>.</p>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
