Here is a workable solution
double temp= 9244.88
java.text.DecimalFormat df = new DecimalFormat("0.00");
Double temp1 = new Double(df.format(temp*100));
temp = temp1.doubleValue();
variable temp doesn't loose any precision.
"Srinivas" <[EMAIL PROTECTED]> wrote:
>
>Any thoughts for this scenario :
> double temp = 9244.88;
> CSpHtml.sendMessage("<BR>temp(1) = " + temp);
> temp = temp * 100.0;
> CSpHtml.sendMessage("<BR>temp(2) = " + temp);
>
>The output is as follows :
>temp(1) = 9244.88
>temp(2) = 924487.9999999999
>
>I use JDK1.1.7A and ND4.1.3 with ND class loader checked.
>This happens only to some particular numbers. Any thoughts or clues will be helpful
>
>Thanks
>
_________________________________________________________________________
To unsubscribe from this mailing list please send an email to:
[EMAIL PROTECTED]
Please remember to use the same email address you subscribed with.
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]