Actually, it's because JSP defines the unknown variable e's type as integer by default. If you set e = 1.0, you set the type as a float or double type, and therefore it will work correctly.
On Wed, 2002-05-01 at 06:58, subbu wrote: > hai, > try this and give an explanation why this happens > (JAVASCRIPT) > > var a,b,c,d,e > a=1.1 > b=1.1 > c=1.1 > d=a+b--------(answer is 2.2) > > e=a+b+c(answer is 3.30000000000002) > alert(e); > > =========================================================================== > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > -- <I><B><FONT SIZE="+2">David A. Bartmess</FONT></B></I><BR> <B><FONT COLOR="BLUE" SIZE="+1">IT Samaritans</FONT><BR> Helping Non-Profits Achieve Technical Excellence</B><BR> <I><B><FONT COLOR="LIGHTBLUE" SIZE="+1">Software Configuration Manager / Sr. Software Developer</FONT></B></I><BR> <A HREF="http://edingo.net">eDingo.net</A> =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
