Re: sorry .09 instead of .08
- From: Thomas Hawtin <usenet@xxxxxxxxxxxxxxxxx>
- Date: Mon, 30 Jan 2006 20:26:19 +0000
zero wrote:
BigDecimal has its own problems, beside the speed. If you initialize a BigDecimal with a double constant, you're in the same boat as using a normal double when it comes to rounding errors.
If you initialise an int or long with a double you'll get the same rounding errors (plus overflow errors for added fun). So, don't use doubles for financial calculations.
Tom Hawtin -- Unemployed English Java programmer http://jroller.com/page/tackline/ .
- Follow-Ups:
- Re: sorry .09 instead of .08
- From: zero
- Re: sorry .09 instead of .08
- References:
- sorry .09 instead of .08
- From: joshdalrymple2000
- Re: sorry .09 instead of .08
- From: James Westby
- Re: sorry .09 instead of .08
- From: Thomas Hawtin
- Re: sorry .09 instead of .08
- From: zero
- Re: sorry .09 instead of .08
- From: Thomas Hawtin
- Re: sorry .09 instead of .08
- From: zero
- sorry .09 instead of .08
- Prev by Date: Beginner CSV error
- Next by Date: Re: Beginner CSV error
- Previous by thread: Re: sorry .09 instead of .08
- Next by thread: Re: sorry .09 instead of .08
- Index(es):
Relevant Pages
|
|