 




<?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: Odd RPGLE Multiplication issue</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/odd-rpgle-multiplication-issue/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/odd-rpgle-multiplication-issue/</link>
	<description></description>
	<lastBuildDate>Sat, 18 May 2013 11:56:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: woodengineer</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/odd-rpgle-multiplication-issue/#comment-71353</link>
		<dc:creator>woodengineer</dc:creator>
		<pubDate>Tue, 08 Dec 2009 17:05:01 +0000</pubDate>
		<guid isPermaLink="false">#comment-71353</guid>
		<description><![CDATA[Have you tried EVAL(R)?]]></description>
		<content:encoded><![CDATA[<p>Have you tried EVAL(R)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/odd-rpgle-multiplication-issue/#comment-71294</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Mon, 07 Dec 2009 07:29:03 +0000</pubDate>
		<guid isPermaLink="false">#comment-71294</guid>
		<description><![CDATA[You have a bunch of fields with six fractional decimal positions. If you multiply two of those fields, an intermediate result must contain 12 fractional positions for accuracy. (Hint: what doues .000001 * .000001 = ?)

If you multiply five such fields, then how many fractional positions must be maintained in an intermediate result? (5 * 6 = 30)

If you work with fields that only hold 15 digits, how can you handle all of the necessary fractional positions? On which side of the decimal point should any accuracy be sacrificed?

The problem isn&#039;t with the multiplication, it&#039;s how you have defined your fields and with insufficient understanding of what happens with fixed-point multiplication. It&#039;s working as defined in the language reference manual.

Easiest resolution is the one you&#039;ve chosen to use, but you might want to test with maximum and minimum values to ensure that everything will always work as expected.

You didn&#039;t say anything about what version of the compiler you&#039;re using, so it&#039;s not clear how many fractional positions are available for you to work with.

Tom]]></description>
		<content:encoded><![CDATA[<p>You have a bunch of fields with six fractional decimal positions. If you multiply two of those fields, an intermediate result must contain 12 fractional positions for accuracy. (Hint: what doues .000001 * .000001 = ?)</p>
<p>If you multiply five such fields, then how many fractional positions must be maintained in an intermediate result? (5 * 6 = 30)</p>
<p>If you work with fields that only hold 15 digits, how can you handle all of the necessary fractional positions? On which side of the decimal point should any accuracy be sacrificed?</p>
<p>The problem isn&#8217;t with the multiplication, it&#8217;s how you have defined your fields and with insufficient understanding of what happens with fixed-point multiplication. It&#8217;s working as defined in the language reference manual.</p>
<p>Easiest resolution is the one you&#8217;ve chosen to use, but you might want to test with maximum and minimum values to ensure that everything will always work as expected.</p>
<p>You didn&#8217;t say anything about what version of the compiler you&#8217;re using, so it&#8217;s not clear how many fractional positions are available for you to work with.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hoffman</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/odd-rpgle-multiplication-issue/#comment-37462</link>
		<dc:creator>hoffman</dc:creator>
		<pubDate>Mon, 29 May 2006 11:34:58 +0000</pubDate>
		<guid isPermaLink="false">#comment-37462</guid>
		<description><![CDATA[That did the trick, thanks Jonathan, I appreciate your help.]]></description>
		<content:encoded><![CDATA[<p>That did the trick, thanks Jonathan, I appreciate your help.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/10 queries in 0.037 seconds using memcached
Object Caching 295/301 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-18 13:52:56 -->