• Post Reply Bookmark Topic Watch Topic
  • New Topic

Conversion to BigDecimal  RSS feed

 
sandeep lokhande
Ranch Hand
Posts: 120
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to convert 0000000000052E to BigDecimal ?
 
Campbell Ritchie
Marshal
Posts: 56525
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What format is that in? If it is the hexadecimal representation, you can try this. Beware: that is a subnormal value, and you will get severe imprecision with the BigDecimal constructor.
I tried it . . . and with a slightly different implementation of the same technique got this
6.5513104638549291757813021934326153975606929826659463762832
6614995895722640296804973387583015529325895610244786161021711208
7467979319761700247753795102967703954747456903529224039235535645
6775026949124091141158031693876430846970453762716929757633972478
4222909675682054601037846291392337973892781349246166654616014456
9718886597594301303189957666590353778758950386519954593926018179
5644063236296831982797807431352771049130504639891547874947613034
3897696589551002453399861853279614292316582380474725849971672579
6047700571257181167732581881859724104582722006827793009474479530
6817939684158981519068215816159458317706535178766258908900483754
8560052407620599080977476744037878675226559953798198373676169678
171027590976409349377007629300351254642009735107421875E-321
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!