incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Smith <...@iriscouch.com>
Subject Re: Modeling a tree in couchdb.
Date Mon, 26 Dec 2011 10:17:05 GMT
On Sat, Dec 24, 2011 at 4:03 AM, Jens Alfke <jens@couchbase.com> wrote:
>
> On Dec 23, 2011, at 3:26 AM, CGS wrote:
>
> An idea I got from the CouchDB documentation: use floating point numbers
> instead of integers. That is, instead of 1, 2, 3, 4..., you can use 0.1,
> 0.2, 0.3, 0.4... or 1.0, 2.0, 3.0, 4.0... That can help you to insert a
> new node (say, 0.15 or 1.5) in between any two given nodes (say, in
> between 0.1 and 0.2 or in between 1.0 and 2.0) without any other
> modification.
>
> This really only postpones the problem, though, since floating-point has finite precision.

That is a reason, among others, why I created bigdecimal.js.

https://github.com/iriscouch/bigdecimal.js

-- 
Iris Couch

Mime
View raw message