Reply to topic  [ 2 posts ] 
Handling long numbers... 
Author Message

Joined: Tue Oct 16, 2007 10:27 am
Posts: 2
Reply with quote
Post Handling long numbers...
Hi,
Our testing team as part of negative testing inputs a very long number in excel and the application fails whenever it tries to read such a huge number.

For example: 2.22222222222222E+96

Here I receive it in exponential format. How to read this such a huge number back?

Any ideas appreciated.

Regards,
SURESH KUMAR M R

_________________
Thanks & Regards,
SURESH KUMAR M R


Sat Sep 27, 2008 8:20 am
Profile

Joined: Wed Nov 07, 2007 4:42 am
Posts: 67
Reply with quote
Post 
Here is a sample code for formatting the number:

Code:
double dBigNo = 2.22222222222222E+96;
DecimalFormat dFDefault = (DecimalFormat)NumberFormat.getNumberInstance();
dFDefault.applyPattern("#.00");
String sNewDouble = dFDefault.format(dBigNo);
System.out.println(sNewDouble);


Tue Sep 30, 2008 5:51 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.