couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <>
Subject Re: Fixed precision of floating point number not respected in views
Date Tue, 19 Feb 2013 21:48:37 GMT
I agree entirely with your last statement (I filed for exactly that

However, I've been convinced that it cannot be done with
Javascript/JSON's meaning of number, hence the suggestion to protect
your values inside strings (which will not be altered or interpreted)
and use math functions that operate on them (the various bignum.js
libraries, for example). Another way to think of this is by
comparison; if you would be happy, in Java, to exclusively use
doubles, you'd be fine here. An important place where that is not
acceptable is money (and, related, currency). You can't invent

I'm +1 on including such a feature in a future release of CouchDB, but
I don't think I got consensus on the idea so far (since it can be done
today without such an extension).


On 19 February 2013 21:39, Luca Morandini <> wrote:
> On 02/20/2013 08:23 AM, Robert Newson wrote:
>> The numbers are not being changed, you are simply being exposed to the
>> truth. :)
> Nicely and concisely put, though it must be noted that Node.js -for
> instance- keeps hiding the truth, hence there is a bit of inconsistency.
> But what if I rely on that low-fidelity representation ?
> This is a DBMS, people expects to get exactly what they put into it.
> Regards,
> 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