Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 35FC4E286 for ; Tue, 19 Feb 2013 08:06:25 +0000 (UTC) Received: (qmail 27874 invoked by uid 500); 19 Feb 2013 08:06:23 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 27674 invoked by uid 500); 19 Feb 2013 08:06:23 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 27655 invoked by uid 99); 19 Feb 2013 08:06:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Feb 2013 08:06:23 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gcdcu-couchdb-user@m.gmane.org designates 80.91.229.3 as permitted sender) Received: from [80.91.229.3] (HELO plane.gmane.org) (80.91.229.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Feb 2013 08:06:15 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U7iDK-0001NS-S9 for user@couchdb.apache.org; Tue, 19 Feb 2013 09:06:10 +0100 Received: from uom-128-250-150-70.eresearch.unimelb.edu.au ([128.250.150.70]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Feb 2013 09:06:10 +0100 Received: from lmorandini by uom-128-250-150-70.eresearch.unimelb.edu.au with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Feb 2013 09:06:10 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: user@couchdb.apache.org From: Luca Morandini Subject: Fixed precision of floating point number not respected in views Date: Tue, 19 Feb 2013 19:05:37 +1100 Lines: 57 Message-ID: Reply-To: lmorandini@ieee.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: uom-128-250-150-70.eresearch.unimelb.edu.au User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 X-Virus-Checked: Checked by ClamAV on apache.org Folks, I have stored fixed precision numbers in a database, but when they are spit out by a view, the precision is full, and -which is worse- the trailing decimal digits are not all zeroes. In other words: Data in the database (as I loaded them as they do appear in Futon): { "_id": "4864f365b6962af5a9c4064b34001722", "_rev": "1-73d234f7ed07b0fc9d4671a9f8ef9b91", "type": "Feature", "properties": { "poll_id": 2734, "dataset": "pbc", "ced": null }, "bbox": [ 151.17281, -33.91018, 151.18159, -33.90162 ] ... Output of the view: { "_id": "4864f365b6962af5a9c4064b34001722", "_rev": "1-73d234f7ed07b0fc9d4671a9f8ef9b91", "type": "Feature", "properties": { "poll_id": 2734, "dataset": "pbc", "ced":null }, "bbox": [ 151.17280999999999835, -33.91017999999999688, 151.18158999999999992, -33.901620000000001198 ] ... Of course, in the view I do not alter the doc (moreover, the same output of the view is replicated when I directly request a document via the Document API). Am I doing something silly ? Regards, Luca Morandini Data Architect - AURIN project Department of Computing and Information Systems University of Melbourne Tel. +61 03 903 58 380 Skype: lmorandini