I was not having a rough day, and I was not trying to be rude. That article is required reading for every programmer.
DecimalFormat would have given you a similar 2-minute solution had you...
Type: Posts; User: KevinWorkman
I was not having a rough day, and I was not trying to be rude. That article is required reading for every programmer.
DecimalFormat would have given you a similar 2-minute solution had you...
Do a google search of an article called "what every computer scientist should know about floating point arithmetic". Read it.
You shouldn't use floats (or doubles) for currency. Use an int and...