Re: sorry .09 instead of .08
- From: "Tony Morris" <not@xxxxxxxxxxx>
- Date: Mon, 30 Jan 2006 09:39:36 +1000
"zero" <zero@xxxxxxx> wrote in message
news:Xns975B380BB167zerothishi@xxxxxxxxxxxxxxxxx
> 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.
Are you saying that billionaires don't exist? My dream has been shattered!!
Use a long - 9223 trillion dollars ought to be enough for anybody, right
Bill?
--
Tony Morris
http://tmorris.net/
.
- 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
- sorry .09 instead of .08
- Prev by Date: Re: sorry .09 instead of .08
- Next by Date: Re: JAR file which needs to call another jar file....
- Previous by thread: Re: sorry .09 instead of .08
- Next by thread: Re: sorry .09 instead of .08
- Index(es):