Thanks Duane.


Happy New Year


Regards,

Louis
���`���,���,���`���,�����,���`���,��,���`���

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 26, 2000 10:54 PM
Subject: Re: double value 10.20 -10.00 = ?? HELP!


>
> Hi Louis,
> I'm replying directly to you since I'm having troubles posting to the
> listserver !!!!!
>
> Try using the java.math.BigDecimal class like this ...
>
>      java.math.BigDecimal a = new java.math.BigDecimal("1000000.20");
>      java.math.BigDecimal b = new java.math.BigDecimal("1000000.00");
>      java.math.BigDecimal c = a.subtract(b);
>      System.out.println(c);
>
> Use BigDecimal when doing big financial calculations where rounding is
critical.
>
> Post my answer if you think appropriate.
>
> cheers,
>
> Duane.
>
>
>
>
>
> Willard Thompson <[EMAIL PROTECTED]>@JAVA.SUN.COM> on
> 12/26/2000 11:20:16 PM
>
> Please respond to A mailing list about Java Server Pages specification and
>       reference <[EMAIL PROTECTED]>
>
> Sent by:  A mailing list about Java Server Pages specification and
>       reference <[EMAIL PROTECTED]>
>
>
> To:   [EMAIL PROTECTED]
> cc:
>
> Subject:  Re: double value 10.20 -10.00 = ?? HELP!
>
>
> Simply adjust your output format.
>
> -----Original Message-----
> From: LouisVoo [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 22, 2000 2:01 AM
> To: [EMAIL PROTECTED]
> Subject: double value 10.20 -10.00 = ?? HELP!
>
>
> Hi,
>   Anyone know why 10.20 - 10.00 = 0.199999999999999993 in Java?  Why the
> answer is not 0.20??
> But, if I try this in JSP page, then its correct.  Any solution for this
> problem? I need to get the actual figure.
> I try in java version 1.1.8, 1.2 and 1.3, they all give me wrong value.
>
>
>
>
>
> Regards,
>
> Louis
> ���`���,���,���`���,�����,���`���,��,���`���
>
> ----- Original Message -----
> From: "Parvez" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, December 20, 2000 11:44 PM
> Subject: Re: (Very very urgent)Sorting a resultset after cl osing the
> connection
>
>
> > yes but won't the java collection framework make it exceedingly slow ?
> > can't we do it faster than that ?
> >
> > parvez
> >
> >
> > And Then  Russell Politzky wrote .............
> >
> > > At 02:16 PM 2000/12/19 -0500, you wrote:
> > > >A simple solution would be to ditch the resultset and convert it to
> XML.
> > > >Then you can use XML/XSL and DOM to sort it easy with an "order-by".
> This
> > > >is a effective solution if you are already using XML and loading
stuff
> into
> > > >the parser DOM.
> > > >
> > > >-Michael
> > > >
> > > >-----Original Message-----
> > > >From: Jyoti Bongarala [mailto:[EMAIL PROTECTED]]
> > > >Sent: Tuesday, December 19, 2000 9:16 AM
> > > >To: [EMAIL PROTECTED]
> > > >Subject: [JSP-INTEREST] (Very very urgent)Sorting a resultset after
> > > >closing the connection
> > > >
> > > >
> > > >HI all,
> > > >
> > > >My problem is I am looking for an algorithm or a
> > > >program that would do the following :
> > > >
> > > >1. Once I retrieve a resultset from the database, I
> > > >store it in a CachedRowSet. And when I display it ,
> > > >the user should be able to sort the data by any column
> > > >(total columns retrieved are 13) and this sorting has
> > > >to be done (outside the database)
> > > >
> > > >Please somebody help me with this or give me a
> > > >lead....
> > > >
> > > >thanks,
> > > >Jyoti
> > >
> > > The Java Collections Framework has what you need.  Read the ResultSet
> out
> > > into a data structure and make comparators for each column so that the
> > > collections framework can sort your data on each column, as required.
> When
> > > you receive a request for sorting on a given column, simply use the
> > > relevant comparator for sorting.  The collections framework will also
> sort
> > > in reverse order, no database interaction required.
> > >
> > >
>
===========================================================================
> > > 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
> >
> >
>
===========================================================================
> > 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
>
>
===========================================================================
> 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
>
>
===========================================================================
> 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
>
>

===========================================================================
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