Results 1 to 5 of 5
- 06-23-2011, 08:01 AM #1
Member
- Join Date
- Jun 2011
- Posts
- 10
- Rep Power
- 0
Exponential number to regular number.
Hi,
I have a requirement, where I have to sum up all the amount values, which are coming in lakhs,billions or with decimal values etc, the final amount is getting converted to Exponential number. I don't want that to be getting converted to exponential format. I want a regular number. Can you please share how to do that. here my currency is USD or GDP.
EX: 5.820536335555559E13
6.06375E7
1.84411675E8
-7.253685E7
-1.150023E8
with out loosing the precession I have to get the whole number. Please guide me on this requirement. Thanks in advance.
- 06-23-2011, 08:11 AM #2
DecimalFormat
db
- 06-23-2011, 08:59 AM #3
Member
- Join Date
- Jun 2011
- Posts
- 10
- Rep Power
- 0
NumberFormat formatter = new DecimalFormat("#.####");
formatter.format(numberwithExponential);
will this work, wont I loose any precession value? how it varies in #.###, ##.##,####,####.##### etc., as I wont be knowing the total value, what notation I need to use. how to use this format.
- 06-23-2011, 09:13 AM #4
First off, there's no such beast as a numberwithExponential. A number is a value. That number may be represented in various ways.
As to your follow-up question, read the API, experiment with a few formats and values, and come back here if you still have a problem.
db
- 06-23-2011, 09:17 AM #5
Member
- Join Date
- Jun 2011
- Posts
- 10
- Rep Power
- 0
Similar Threads
-
Finding a number in array close to another number
By SteroidalPsycho in forum New To JavaReplies: 2Last Post: 02-15-2010, 12:37 AM -
Printing the Number of Times a Number in a Range Shows up
By space4rent00 in forum New To JavaReplies: 1Last Post: 02-05-2010, 10:42 PM -
Geting Mobile Number, Mobile Operator, Location and Mobile Serial Number by J2ME.
By maruffaiz in forum CLDC and MIDPReplies: 1Last Post: 08-07-2009, 12:14 PM -
why the number will not increase?
By rayda in forum New To JavaReplies: 3Last Post: 03-16-2009, 05:47 AM -
how to extract the number of the image which looks like a number
By Crest.Boy in forum Java ServletReplies: 1Last Post: 11-03-2008, 02:38 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks