incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <B.Cand...@pobox.com>
Subject Re: sum function in reduce with precision problems?
Date Sat, 12 Dec 2009 19:04:01 GMT
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
View raw message