couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicholas Orr <nicholas....@zxgen.net>
Subject Re: sum function in reduce with precision problems?
Date Mon, 14 Dec 2009 04:10:49 GMT
Yeah I've picked this route - it is a bit of a pain though that map/reduce
can't make use of the data and need process app/client side. Just lucky in
this particular app it is really a moot point and the diff in speed is for
intents zero.

Nick

2009/12/13 Brian Candler <B.Candler@pobox.com>

> On Sat, Dec 12, 2009 at 01:18:41PM +0000, Leo Simons wrote:
> > Looks like you're representing money; just work with cents (stored as
> > ints) and you will *probably* be fine, especially if you stay clear of
> > divisions. I wouldn't try and implement my own finance package that way,
> > though :)
> >
> > Alternatively, implement your own decimal type in javascript, or use a
> > relational database :)
>
> Or store strings (and deal with them with your client's BigDecimal or
> equivalent)
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message