<?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: assinment1..problem in Q-15</title>
	<atom:link href="https://www.emblogic.com/blog/06/assinment1-problem-in-q-15/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog/06/assinment1-problem-in-q-15/</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Mon, 07 Oct 2013 04:00:03 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>By: rahul gaur</title>
		<link>https://www.emblogic.com/blog/06/assinment1-problem-in-q-15/#comment-840</link>
		<dc:creator><![CDATA[rahul gaur]]></dc:creator>
		<pubDate>Tue, 26 Jun 2012 16:45:08 +0000</pubDate>
		<guid isPermaLink="false">http://emblogic.org/blog/?p=3564#comment-840</guid>
		<description><![CDATA[Hi here is my code take a look ..
I am also skeptic about the answer...

e-notation basically 2.0e20(or AeN) represents 2.0 * 10^20..

#include
#include

int main(void)
{
  float a,b;
  b = (2.0*pow(10,20)) + 1.0;//2.0e20 Can be expressed as 2.0 * 10^20 
  printf(&quot;Value of b is %f\n&quot;,b);
  
  float c = 2.0e20;
  printf(&quot;Value of c is %f\n&quot;,c);
  
  a = b - (2.0*pow(10,20))/*c*/;//if I replace the exp with var c result changes to 0.0000....
  printf(&quot;Value of %f - %f =  %f \n&quot;,b,c,a);//Result seems lil Strange :P

  
  return 0;

}


=============output=================
for the code in question
[root@linuxstation asgmt]# ./fourteen 
./fourteen 
Value of b is 200000004008175468544.000000
Value of c is 200000004008175468544.000000
Value of 200000004008175468544.000000 - 200000004008175468544.000000 =  4008175468544.000000

+++++++++++++output+++++++++++++++++++
when I replace the a = b - c ;

[root@linuxstation asgmt]# make fourteen
make fourteen
cc     fourteen.c   -o fourteen
[root@linuxstation asgmt]# ./fourteen 
./fourteen 
Value of b is 200000004008175468544.000000
Value of c is 200000004008175468544.000000
Value of 200000004008175468544.000000 - 200000004008175468544.000000 =  0.000000 
[root@linuxstation asgmt]#]]></description>
		<content:encoded><![CDATA[<p>Hi here is my code take a look ..<br />
I am also skeptic about the answer&#8230;</p>
<p>e-notation basically 2.0e20(or AeN) represents 2.0 * 10^20..</p>
<p>#include<br />
#include</p>
<p>int main(void)<br />
{<br />
  float a,b;<br />
  b = (2.0*pow(10,20)) + 1.0;//2.0e20 Can be expressed as 2.0 * 10^20<br />
  printf(&#8220;Value of b is %f\n&#8221;,b);</p>
<p>  float c = 2.0e20;<br />
  printf(&#8220;Value of c is %f\n&#8221;,c);</p>
<p>  a = b &#8211; (2.0*pow(10,20))/*c*/;//if I replace the exp with var c result changes to 0.0000&#8230;.<br />
  printf(&#8220;Value of %f &#8211; %f =  %f \n&#8221;,b,c,a);//Result seems lil Strange <img src="https://www.emblogic.com/blog/wp-includes/images/smilies/icon_razz.gif" alt=":P" class="wp-smiley" /> </p>
<p>  return 0;</p>
<p>}</p>
<p>=============output=================<br />
for the code in question<br />
[root@linuxstation asgmt]# ./fourteen<br />
./fourteen<br />
Value of b is 200000004008175468544.000000<br />
Value of c is 200000004008175468544.000000<br />
Value of 200000004008175468544.000000 &#8211; 200000004008175468544.000000 =  4008175468544.000000</p>
<p>+++++++++++++output+++++++++++++++++++<br />
when I replace the a = b &#8211; c ;</p>
<p>[root@linuxstation asgmt]# make fourteen<br />
make fourteen<br />
cc     fourteen.c   -o fourteen<br />
[root@linuxstation asgmt]# ./fourteen<br />
./fourteen<br />
Value of b is 200000004008175468544.000000<br />
Value of c is 200000004008175468544.000000<br />
Value of 200000004008175468544.000000 &#8211; 200000004008175468544.000000 =  0.000000<br />
[root@linuxstation asgmt]#</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arjumand</title>
		<link>https://www.emblogic.com/blog/06/assinment1-problem-in-q-15/#comment-839</link>
		<dc:creator><![CDATA[arjumand]]></dc:creator>
		<pubDate>Tue, 26 Jun 2012 16:29:02 +0000</pubDate>
		<guid isPermaLink="false">http://emblogic.org/blog/?p=3564#comment-839</guid>
		<description><![CDATA[e20 is the scientific notation......it means 10 to the power 20]]></description>
		<content:encoded><![CDATA[<p>e20 is the scientific notation&#8230;&#8230;it means 10 to the power 20</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rahul.gautam</title>
		<link>https://www.emblogic.com/blog/06/assinment1-problem-in-q-15/#comment-838</link>
		<dc:creator><![CDATA[rahul.gautam]]></dc:creator>
		<pubDate>Tue, 26 Jun 2012 14:46:59 +0000</pubDate>
		<guid isPermaLink="false">http://emblogic.org/blog/?p=3564#comment-838</guid>
		<description><![CDATA[it will be showing some random value....because float data type have precision till e7....after this it starts giving some random value...and in this above equation you are trying to modify 21st digit which is not possible.]]></description>
		<content:encoded><![CDATA[<p>it will be showing some random value&#8230;.because float data type have precision till e7&#8230;.after this it starts giving some random value&#8230;and in this above equation you are trying to modify 21st digit which is not possible.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
