Dear all,
      Who can tell me why the result is 0.040000916? and why it's not =
0.04, if I want to get 0.04 how could I do? thanks

Lancelot

D:\test>type testD.java
public class testD
{
  public static void main(String args[])
  {
    float d1=3D99.44f;
    float d2=3D99.40f ;
    float d3 =3D d1-d2 ;
    System.out.println(d3);
  }
}


D:\test>java testD
0.040000916

===========================================================================
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://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to