permaculture playing cards*
The moose likes Java in General and the fly likes Changing the exponential number into normal readable number format? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Changing the exponential number into normal readable number format?" Watch "Changing the exponential number into normal readable number format?" New topic
Author

Changing the exponential number into normal readable number format?

Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
Actually in my code, floatValue of BigDecimal was taken. for bigger numbers onwards 17548097, it starts losing its precision and starts giving a difference of value 1. So thats why now i decided to take the doubleValue of BigDecimal.

I am just doing this test :

but the output i do get is in exponential form. I want to change it into simple number. How is it this possible ?


SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog- http://rkydesigns.blogspot.com
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
Looks like this is the correct choice to be followed:

I checked using this code, Double value do not precision up to Double.MAX_VALUE
but when i do see this value Double.MAX_VALUE, it comes up in exponential format.

need to change the exponential format number into number represented without exponential format .

pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
you want a simple number that's over 300 places long?

if so, you could always use the toPlainString() method of big decimal:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing the exponential number into normal readable number format?