Re: sorry .09 instead of .08
- From: zero <zero@xxxxxxx>
- Date: Sun, 29 Jan 2006 23:20:27 GMT
Thomas Hawtin <usenet@xxxxxxxxxxxxxxxxx> wrote in
news:43dd47b0$0$1488$ed2619ec@xxxxxxxxxxxxxxxxxxxxxxxxxx:
> James Westby wrote:
>>
>> The problem is that you can't use floating point arithmetic (doubles)
>> to do precise arithmetic. If possible then you should try using fixed
>> point arithmetic. e.g.
>
> It's probably better to use BigDecimal in most situations.
>
> Tom Hawtin
BigDecimal will be slower though. If the values are all currency values,
with only 2 numbers after the decimal point, ints are a good choice.
.
- Follow-Ups:
- Re: sorry .09 instead of .08
- From: Thomas Hawtin
- Re: sorry .09 instead of .08
- From: Tony Morris
- 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
- sorry .09 instead of .08
- Prev by Date: Re: sorry .09 instead of .08
- Next by Date: Re: sorry .09 instead of .08
- Previous by thread: Re: sorry .09 instead of .08
- Next by thread: Re: sorry .09 instead of .08
- Index(es):
Relevant Pages
|