hello all,
I don't want to BigDecimal to do any smart thing.
0.4321^20
I want to get
.00000005148554641076956121994511276767154838481760200726351203835429763013462401
but not
5.148554641076956121994511276767154838481760200726351203835429763013462401E-8
how to do with the format?
thanks in advance.
best regards
blackswift
Luc The Perverse - 15 Apr 2006 07:15 GMT
> hello all,
> I don't want to BigDecimal to do any smart thing.
[quoted text clipped - 11 lines]
> best regards
> blackswift
Um. For the example you provided either way is feasible - but what if the
answer is -1.64E-180?
Do you understand E notation? It is really cool.
--
LTP
:)
blackswift - 15 Apr 2006 07:29 GMT
I know E is OK.
But in this situation only I need is a simple form
Mark Thomas - 15 Apr 2006 11:46 GMT
> I know E is OK.
> But in this situation only I need is a simple form
There's a bit on that in this Tech Tip:
http://java.sun.com/developer/TechTips/1999/tt0826.html
Mark
Mark Thomas - 15 Apr 2006 11:53 GMT
>> I know E is OK.
>> But in this situation only I need is a simple form
[quoted text clipped - 3 lines]
>
> Mark
Whoops - I now see that at Java 5.0 DecimalFormat can format and parse
BigDecimal. You just need to enable it using the setParseBigDecimal method.
Mark