couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Davies <>
Subject Re: json/couchdb integer min max values
Date Mon, 23 Mar 2009 01:29:11 GMT
On 22 Mar 2009, at 22:24, Adam Kocoloski wrote:

> Nope, unfortunately it doesn't just work.  On the Erlang side  
> everything is certainly fine, but JavaScript uses IEEE doubles to  
> represent Numbers.  You get ~15 digits of precision before funny  
> things start happening in views, IIRC.
> If you need precise storage of large numbers, you'll need to store  
> them as strings.  You can still use the strings as view keys without  
> any trouble at all.
> I'm no JavaScript pro, but someone on IRC (Jason Davies, maybe?)  
> mentioned that future versions of ECMAScript may have better BigNum  
> support.  Hope that helps,

Yep, ECMAScript 4 should come with support for "real decimals".  See  
my comment [1] on COUCHDB-227 for a couple of blog post links about  
this.  I should write this up on the Wiki when I get a chance.


Jason Davies

View raw message