Link Details

Link 30015 thumbnail
User 160542 avatar

By kirillcool
via jroller.com
Published: Jul 12 2007 / 08:11

What happens in Java when we have to deal with large decimal numbers? Numbers that must be accurate, of unlimited size and precision? We use BigDecimal, of course. Yet, I have a sense that we tend to curse every time we do. Why is that?
  • 19
  • 2
  • 1550
  • 643

Comments

Add your comment
User 182143 avatar

mezmo replied ago:

0 votes Vote down Vote up Reply

I've never really had a problem with BigDecimal, after having had to write and use BCD libraries for C when doing tax software back in the day, I was pretty grateful to have something like that built in, but its good to see people are still thinking about it and trying to make things better.

User 235974 avatar

warpedjavaguy replied ago:

0 votes Vote down Vote up Reply

I remember reading a discussion about BigDecimal's being a BigMistake some time back. The discussion was about why the engineers at Sun created them the way they did. I found the discussion quite interesting and am always reminded of it whenever I see, hear, or work with BigDecimals or Number types in Java.

This is definitely one of those topics that stick in your head and never go away. For those interested here it is, I've found it:
http://jroller.com/page/cpurdy?entry=the_seven_habits_of_highly1

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.