try this: public class TestFloat { public static void main(String[] args) { float f1 = 1.0f; float f2 = 0.9f; System.out.println(f1 - f2); }
} -- pady Conyers, Dwayne wrote: >Padhu Vinirs [mailto:[EMAIL PROTECTED]] wrote: > > > >>Float and Double arithmetic is only >>approximate. Try using BigDecimal. >> >> > >Yow... I never read that anywhere. That is good information. Is it >documented *anywhere* ?? > >Dwacon >www.dwacon.com > >=========================================================================== >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 > > > =========================================================================== 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