incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luca Morandini <>
Subject Re: Fixed precision of floating point number not respected in views
Date Tue, 19 Feb 2013 20:46:49 GMT
On 02/20/2013 01:42 AM, Volker Mische wrote:
> I think it does address indexes. Only the JavaScript engine will deal
> with the encoding/decoding. AFAIK SpiderMonkey/V8 doeas the right thing.

I did a quick check:

lmorandini@vaneyck: >node
 > var n= {"n": 17.3};
 > console.log(n.n);
 > 17.0 + 0.3

function(doc) {
   emit(doc._id, [17.3, 17.0 + 0.3]);

lmorandini@vaneyck: >curl -X GET 


Therefore, I would argue this is not a feature intrinsic to JSON or JavaScript.

I appreciate suggestions from other members of the list, but changing numbers to 
integers or multiplying them (essentially the same suggestion) is not an option, 
since I have little control over input data, and it will kill performance  too (I 
deal mainly with geo-spatial data, hence heaps of numbers in arrays of arrays).

Well, there it goes my academic track paper on CouchDB and GeoCouch for FOSS4G '13 :(


Luca Morandini
Data Architect - AURIN project
Department of Computing and Information Systems
University of Melbourne
Tel. +61 03 903 58 380
Skype: lmorandini

View raw message